Debugging with sourcemap (babel), breakpoints move and can't see values of "non-local but in scope" variables. Works in chrome debugger. #61334
Labels
debug
Debug viewlet, configurations, breakpoints, adapter issues
Steps to Reproduce:
So far, I have a fairly simple application. (https://github.com/dipunm/react-boiler/tree/5f14be9393aadbf717685cc91a5e8f9f03f54e2d)
The broken file in question is:
also, breakpoints are here:
![image](https://user-images.githubusercontent.com/5099980/47231382-a4fe9a80-d3c4-11e8-8d52-c3173aedf7be.png)
The only other source file (App.js):
Then:
.babelrc
package.json scripts:
and my current launch.json
execute:
![image](https://user-images.githubusercontent.com/5099980/47231444-cbbcd100-d3c4-11e8-9176-fce1ea2345e5.png)
![image](https://user-images.githubusercontent.com/5099980/47231538-0e7ea900-d3c5-11e8-802d-8c48578a661f.png)
npm run debug
debug using 'Attach'.
It will start debugging, after continuing, it will eventually break on a different line:
And you can see the breakpoints moved.
Detach and re-attach and the breakpoints are now back to where they should be (this is the same as if I started by executing
npm start
)The problem now is that local variables are not what I expect:
You can see things like
_App
,_bluebird
,_express
have underscores before them but the variablesApp
,Promise
,express
are nowhere in scope. Local variables (eg. variables likeport
when inside thestart()
function) exist and I can hover over them etc.Same thing but using chrome debugger, I can see all the variables I expect to see, I can hover over and watch things like
portfinder
but not in vscode.Does this issue occur when all extensions are disabled?: No -- But neither of the launch configurations work anumore. The attach complains that it can't find anything at port 1234 when the terminal says it is listening at port 1234, and the launch command is asking to use the inspector protocol and then complains that --debug-brk is not valid anymore (which vscode is doing on my behalf)
I have tried to give as much detail as I can. More details:
node: 8.10.0
npm: 6.1.0
chrome: Version 69.0.3497.100 (Official Build) (64-bit)
transpiled files are running in memory.
Upon further inspection, chrome has some of the characteristics of vscode... (but)
![image](https://user-images.githubusercontent.com/5099980/47232291-32db8500-d3c7-11e8-869e-c63ce0f93cc3.png)
![image](https://user-images.githubusercontent.com/5099980/47232305-3b33c000-d3c7-11e8-85aa-3e85b3f2423b.png)
...but 2 things it does better is:
npm run debug
)The text was updated successfully, but these errors were encountered: