Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Commented Issue: Debugger breaking in unexpected files [762]

$
0
0
Create new Basic Express application (Node.js or TypeScript, same behavior)
Put breakpoint in routes/index.js on line 7:
```
res.render('index', { title: 'Express' });
```
Press F5 to start debugging
Breakpoint should be hit
Press F5

Result: It's going to break again in another index.js, then again, and again. Always on/around line 7.
Comments: It's due to wrong `scriptRegExp` expression in the v8 `setbreakpoint` command which used file name without directory name. Instead of scriptRegExp we should set break points by using full script file name: https://github.com/joyent/node/blob/v0.10.26-release/deps/v8/src/debug-debugger.js#L1632

Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>