Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Debugging transpiled code changes the breakpoint line number #417

Closed
xp500 opened this issue Apr 19, 2018 · 6 comments
Closed

Debugging transpiled code changes the breakpoint line number #417

xp500 opened this issue Apr 19, 2018 · 6 comments
Assignees
Labels
api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. 🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@xp500
Copy link

xp500 commented Apr 19, 2018

After applying #402 locally, I managed to get the stackdriver debugger to work. The problem is that if I set a breakpoint on a typescript file the breakpoint line will change when the breakpoint hits

Before hitting
image
After hitting
image

I believe that the problem is on https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/blob/master/src/agent/v8/legacy-debugapi.ts#L461 and https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/blob/master/src/agent/v8/inspector-debugapi.ts#L469 which changes the line number to the one set in the call frames. The problem is that the call frames refer to another file (the javascript file) and not the original typescript file where I set the breakpoint.

@DominicKramer
Copy link
Contributor

Thank you for letting us know about this and for looking into this. As we work through this, we will keep this thread updated with status updates.

@dickfickling
Copy link

This has an additional impact which is that breakpoints set on a line after compiled file ends won't work at all. For example, my user.ts file has 519 lines. Compiled as user.js, it has 434 lines. I can't add a breakpoint to user.ts after line 434

image

@DominicKramer
Copy link
Contributor

Thanks for letting us know about this. Based on this feedback, I have updated the priority of this issue.

DominicKramer added a commit to DominicKramer/cloud-debug-nodejs that referenced this issue Jun 11, 2018
@JustinBeckwith JustinBeckwith added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed bug labels Jun 12, 2018
@JustinBeckwith JustinBeckwith added the 🚨 This issue needs some love. label Jun 12, 2018
@ofrobots ofrobots removed the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Jun 12, 2018
@DominicKramer
Copy link
Contributor

This issue has been fixed and released in version 2.6.0. If you are still encountering problems, please let me know. Thanks.

@dickfickling
Copy link

@DominicKramer The issue I reported above (unable to add breakpoints after end of original file) is still happening, although the original submitted issue (breakpoints moving) seems to be fixed.

@DominicKramer
Copy link
Contributor

Thank you for letting us know about this issue. I have created issue #464 specifically to track not being able to add breakpoints after the end of the original file.

@google-cloud-label-sync google-cloud-label-sync bot added the api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. 🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

6 participants