Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Cannot read property 'mappedPath' of undefined at EagerSourceMapTransformer.setBreakpoints #256

Open
auchenberg opened this issue Nov 15, 2017 · 7 comments
Assignees

Comments

@auchenberg
Copy link
Contributor

From Mike Kaufman

Hey Kenneth – just installed new version of VS code yesterday and now I can’t set breakpoints. I see this in my output:

Debugging with inspector protocol because Node.js v8.6.0 was detected.
node --inspect-brk=40654 src\agent.js
Debugger listening on ws://127.0.0.1:40654/9fe6fed3-1710-4ef6-859f-f9f26d230ecb
Error processing "setBreakpoints": TypeError: Cannot read property 'mappedPath' of undefined
    at EagerSourceMapTransformer.setBreakpoints (c:\Program Files\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\node_modules\vscode-chrome-debug-core\out\src\transformers\baseSourceMapTransformer.js:63:23)
    at validateBreakpointsPath.then (c:\Program Files\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\node_modules\vscode-chrome-debug-core\out\src\chrome\chromeDebugAdapter.js:827:40)
    at <anonymous>

Known issue? We’re generating maps w/ gulp-typescript IIRC, so maybe something w/ how maps are getting gen’d?

@roblourens
Copy link
Member

Can I have the log or repro steps?

@auchenberg
Copy link
Contributor Author

Ping @mike-kaufman

@mike-kaufman
Copy link

how would I create a log? Repo steps may involve a private repo, so I can PM you instructions for that if you'd like.

@roblourens
Copy link
Member

You can just set "trace": true in your launch config, then reproduce the issue, then upload the log from the path it prints in the debug console. I would take repro steps too over email, whichever is easier.

@roblourens
Copy link
Member

roblourens commented Nov 20, 2017

The bug is

  • Have a BP set in a doc that the adapter hasn't mapped to disk
  • Stop debugging, keep the doc open
  • Start debugging again

The doc's sourceReference is from the previous debug session. The adapter isn't expecting a sourceReference that doesn't exist yet.

But I will reply over email about why the sourcemaps aren't working.

@roblourens
Copy link
Member

Error messages will be fixed in the next release, but the underlying issue could still be addressed.

@shubhatg
Copy link

shubhatg commented Sep 5, 2019

I am getting the similar error, i guess its because of the change in the node version, I had node v8.0 now its v10.x
Debugging with inspector protocol because Node.js v10.16.0 was detected.
node --inspect-brk=21545 node_modules\test-past\bin\past.js
Debugger listening on ws://127.0.0.1:21545/06fde490-2da2-457d-8257-dc4e2023954a
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Error processing "setBreakpoints": TypeError: Cannot read property 'mappedPath' of undefined
at EagerSourceMapTransformer.setBreakpoints (c:\Program Files\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\node_modules\vscode-chrome-debug-core\out\src\transformers\baseSourceMapTransformer.js:63:23)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants