-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Breakpoints not working #45657
Comments
Wow there cowboy. What language are you debugging? |
The language is typescript\JavaScript. I have not had this problem until
the latest update this week. I do not have a repo at this point as this is
code I a developing at work. I can try to reproduce in another project if
need be.
Paul
…On Mar 13, 2018 8:39 AM, "Isidor Nikolic" ***@***.***> wrote:
Wow there cowboy. What language are you debugging?
Can you provide a simple repository for which we can reproduce this
constantly?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45657 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKcQtlyhNrr67bf0F4vHuWhWHEXbDVWXks5td8vzgaJpZM4SosJt>
.
|
I got the same problem using typescript and ts-node. It works when I'm using the keyword This is a showstopper, have to downgrade (again) If you want an example, you may clone https://github.com/lostfields/express-ts-router and open the workspace file after installing dependency and launch the debug "Launch mocha tests (workspace)" after inserting a breaking to /src/test/basic.ts:29 |
@lostfields the launch.json is missing from the project. How does your launch.json look like? |
@weinand the launch is inside the .code-workspace file. You have to open it as a workspace (not folder). |
Aha, thanks. I've filed an issue about this #45749 |
Your setup works fine for me on macOS with VS Code 1.21 and 1.22. |
Same problem here. Here's a little project I've created for showcase the problem. If you set a breakpoint in the gulpFile.js, it's not going to get hit. Interestingly, after changing the casing from gulpFile.js to gulpfile.js and re-setting the breakpoints, they do get hit! |
Yep, I can repro on Windows. |
@weinand I'm on Windows. |
@roblourens I've produced debug-logs There is an interesting difference when the TS file with the breakpoint ("basic.ts") is loaded. In 1.20.3 the load triggers a SourceMaps.setBP in 1.21.0 it does not. Please note that we started to normalize drive letters in 1.21 (see #43959). But I could not spot any drive-letter-casing differences in the logs. VS Code 1.20.3:
VS Code 1.21.2:
|
I am on Windows as well. This just started after the last update.
Paul
…On Mar 14, 2018 7:02 AM, "Andre Weinand" ***@***.***> wrote:
@roblourens <https://github.com/roblourens> I've produced debug-logs
<https://github.com/Microsoft/vscode/files/1810886/traces.zip>
for VS Code 1.20.3 (where the bp is hit) and 1.21.0 (where the bp is
missed).
There is an interesting difference when the TS file with the breakpoint
("basic.ts") is loaded. In 1.20.3 the load triggers a SourceMaps.setBP in
1.21.0 it does not.
Please note that we started to normalize drive letters in 1.21 (see #43959
<#43959>).
VS Code 1.20.3:
SourceMaps.getMapForGeneratedPath: Using inlined sourcemap in c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts
SourceMap: creating for c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts
SourceMap: sourceRoot: undefined
SourceMap: sources: ["C:\\Users\\weinand\\Projects\\REPROS\\bug45657\\express-ts-router\\src\\test\\basic.ts"]
SourceMap: no sourceRoot specified, using script dirname: c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test
SourceMaps.scriptParsed: c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts was just loaded and has mapped sources: ["c:\\Users\\weinand\\Projects\\REPROS\\bug45657\\express-ts-router\\src\\test\\basic.ts"]
SourceMaps.setBP: Mapped c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts to c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts
SourceMaps.setBP: Mapped c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts:22:1 to c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts:16:5
SourceMaps.setBP: Mapped c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts:29:1 to c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts:20:9
→ To target: "{\"id\":13,\"method\":\"Debugger.getPossibleBreakpoints\",\"params\":{\"start\":{\"scriptId\":\"195\",\"lineNumber\":15,\"columnNumber\":0},\"end\":{\"scriptId\":\"195\",\"lineNumber\":16,\"columnNumber\":0},\"restrictToFunction\":false}}"
→ To target: "{\"id\":14,\"method\":\"Debugger.getPossibleBreakpoints\",\"params\":{\"start\":{\"scriptId\":\"195\",\"lineNumber\":19,\"columnNumber\":0},\"end\":{\"scriptId\":\"195\",\"lineNumber\":20,\"columnNumber\":0},\"restrictToFunction\":false}}"
← From target: {"method":"Debugger.scriptParsed","params":{"scriptId":"196",....
VS Code 1.21.2:
SourceMaps.getMapForGeneratedPath: Using inlined sourcemap in c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts
SourceMap: creating for c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts
SourceMap: sourceRoot: undefined
SourceMap: sources: ["C:\\Users\\weinand\\Projects\\REPROS\\bug45657\\express-ts-router\\src\\test\\basic.ts"]
SourceMap: no sourceRoot specified, using script dirname: c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test
SourceMaps.scriptParsed: c:\Users\weinand\Projects\REPROS\bug45657\express-ts-router\src\test\basic.ts was just loaded and has mapped sources: ["c:\\Users\\weinand\\Projects\\REPROS\\bug45657\\express-ts-router\\src\\test\\basic.ts"]
← From target: {"method":"Debugger.scriptParsed","params":{"scriptId":"195",....
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45657 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKcQtr2OKUNq_FVGJqjo2yTgldBKHWk1ks5teQbpgaJpZM4SosJt>
.
|
@weinand Thanks for the logs, wish I'd seen them earlier today. I came to the same conclusion after much debugging. I don't think I knew about the drive letter normalization. Unfortunately the debug adapter normalizes to lower case, but doesn't do it for one case that's being hit here. |
Summary - this was broken by #43959, there is one case where the adapter doesn't correctly fix the drive letter case. I have a low-impact fix, everyone please try it in tomorrow's Insiders build (or the next vscode-chrome-debug update) and let me know how it goes. Marked as candidate in case we get a 1.21.2 out but wouldn't trigger a .2 by itself. The best workaround for people using 1.21 is to set the For people using ts-node, outFiles doesn't help because the sourcemaps don't exist on disk, so they can't be preloaded. The only workaround there is to deactivate then reactive breakpoints after debugging has started, since the bug is avoided if BPs are set when the scripts have been loaded. Or, right click the breakpoints pane and "Reapply all breakpoints". |
…d lowercased driveletters
https://github.com/lostfields/express-ts-router @roblourens It doesn't work for me in this project, works in 1.20.1, but not in 1.22.0-insider. I got the logs but they are huge, so I just include a small part that I think shows the problem 1.20.1
1.22.0-insider
I've noticed that 1.20.1 has about 5 entries of |
@roblourens why is this closed when it still doesn't work? |
|
@roblourens @JosepAlacid reapply breakpoints works but I really hope that's a temporary work-around. |
When can we expect it to be fixed and released - it is very annoying to write tests without debugging... |
@lostfields Trying multiple projects and windows machines, I still haven't been able to reproduce another issue in Insiders. That part of the log isn't large enough, could you upload the whole thing? You can send it to the email address in my profile if that's easier. Also, could you set |
@roblourens Hi, I've mailed you the logs now, for the newest insider vs vscode 1.20.1. Have you opened the project at https://github.com/lostfields/express-ts-router as a Workspace ? The workspace file contains the launch code I've been using.
Still got issues. I had to remove the "breakOnLoadStrategy" for 1.20.1 since my breakpoints didn't hit when I had this. For 1.22.0 it didn't matter whether it was there or not, since my breakpoints never hit. |
@roblourens I may have found something interesting. Open my project as a Workspace using the Launch "Run program (workspace)"1.22.0Debugging by launching "Run program (workspace)" works if I place a breakpoint at 1.20.1I did the same thing here, breakpoints at Launch "Launch mocha tests (workspace)"1.22.0Never hits the breakpoint if I place it at 1.20.1Hits the breakpoint at |
Yes, I've been opening it as a workspace and testing with the same launch config and setup, and hitting the breakpoint consistently. Received the logs, thanks. |
I recently upgraded to 1.21.0 and now 1.21.1, both of which broke the breakpoints. I tried going back to version 1.16, which really messed things up, so now I am at 1.21.1. Is there going to be a fix to this? |
Try Insiders https://code.visualstudio.com/insiders |
@roblourens my disk (harddrive) is pretty slow at the moment, may that affect anything?
|
Looking at it offline with @lostfields, we found that an old version of the node-debug2 extension was somehow installed. @borekb I think you also are still having issues using Insiders. Could you check whether you have anything at |
@roblourens Nope :(
|
for me the latest version of the insiders fixed it 👌 |
Still broke Debugger for Chrome version 4.2.2, Vs Code 1.21.1 |
Please open a new issue in https://github.com/microsoft/vscode-chrome-debug/issues with details |
That is the whole issue that got me onto this thread. Chrome debugging.
Unfortunately I do not have the luxury of time to help out by installing
and trying out all of these different versions as I am the sole dev on a
big project right now.
Paul
…On Mon, Mar 26, 2018, 1:13 AM Rob Lourens ***@***.***> wrote:
Please open a new issue in
https://github.com/microsoft/vscode-chrome-debug/issues with details
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45657 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKcQtk3DuNpLcjDRlY-WqYplZG5pC9Fnks5tiIb2gaJpZM4SosJt>
.
|
@roblourens can you provide more details about what we should verify? |
Easy way is to clone https://github.com/Jostar1024/ts-jest-vscode-1.21.0, set breakpoints in the tests, run the launch config. It should hit the BPs in insiders but not stable |
Issue Type: Bug
After getting te last update, breakpoints no longer work. The breakpoints are breaking on the wrong line of code and therefore are not working.
VS Code version: Code 1.21.0 (9a199d7, 2018-03-07T11:04:09.969Z)
OS version: Windows_NT x64 6.1.7601
System Info
Extensions (8)
The text was updated successfully, but these errors were encountered: