-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Smart Step marks code that should not be skipped, using ts-node #68127
Comments
additional note: this does not happen on version 1.30.2 |
It's not really clear what you are seeing... can you include a screenshot? Can you share the project? |
@roblourens I can't really share any of the code, bud I could try and make it more clear on what is going on. I am working on nestjs application. Since updating to version 1.31 from 1.30.2 I had trouble when running in debug mode. When running the application in debug whenever I hit my breakpoint the application stops at the right place, but vscode doesn't mark the line yellow (as it usually does) on the current line of execution, when i go to call stack window I can see few functions in call stack are "skipped by SmartStep". When expanding the skipped functions I can see that those are the ones with my breakpoints. |
Same problem here I tink. Something happened with 1.31.0 that broke debugging in editor. Jumps over lines of code irradically, doesnt show the actual debugging line in the editor unless call stack is clicked. Doesnt matter if its top level (like a mocha test) or farther down in sub libraries. Also tried to disable smartStep in .vscode options without result. Never heard of the feature until now. |
Can anyone share their project where this happens? Or set |
Not so easy to share the code unfortunately. The log is over 9 MB in our case (possible cause?) and contains information not so sharable either unfortunately. Added a debug point in the mocha tests where the behaviour happens and copied the last rows Last rows in log
Also attached config file {
"version": "0.2.0",
"configurations": [
{
"name": "Local mocha",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"smartStep": false,
"args": ["--require", "ts-node/register", "test/mocha/**/*.ts", "--no-timeouts"],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": { "NODE_ENV": "testing"},
"console": "integratedTerminal",
"trace": true
},
]
} |
I can't repro any real issue with this, but I do see that disabling it does not work properly. The next release will have a fix so that setting smartStep to false will correctly stop labelling the frames as smartStepped. |
Ok, now I can repro this. It's not a regression on the debug adapter side, but it's more noticeable in vscode now because vscode is not highlighting the current line when it grayed out. But it's not clear what the right thing is for vscode to do. The debug adapter's issue is that the runtime js file and the sourcemapped file have the same name and .ts extension, and that causes some confusion. Trying to fix that, I run into #68480 Trying a simpler workaround, I try to change
to
but it seems that this isn't respected, is there a way to do that @isidorn? |
So as of now, there isn't any way to disable smart step in settings.. Or some other workaround for this? |
|
https://update.code.visualstudio.com/1.30.2/win32-x64-user/stable |
@roblourens I was on vacation, am I still needed for something here? If yes let me know what so I do not have to read the whole discussion from above |
#68480 should be fixed and I can look into that if it's easy. I also had this issue:
to just fix the presentationHint on the top frame. I'm curious about that but #68480 is the main thing I will look at for a real fix for the next release. |
@roblourens When is the next release planned for? Debugging has become a colossal pain for many of us. Appreciate you looking into this! |
@lonix1 The next release is planned for in about 2 weeks. We can easily change both those places to also check the presentaitonHint on the stackFrame if that is what you really need also after you do the real fix. |
@lonix1 you can also set |
I have a similar issue to this, for each If I type Really annoying, using debugging through Version: 1.31.1 (system setup) EDIT |
this defect is killing me. I'm using the Jest extension, so that I can run singular tests, but I can't figure out how to set "smartStep": false in this context, as I don't use the launch.json file at all for the jest extension... My test files are rather large, so having to debug entire files again would be equally painful |
Would appreciate if everyone tries this in the next Insiders build (without the workaround of disabling smartStep). It should work properly now. |
Verification steps for my team
|
I removed the |
@roblourens I tried the latest insiders build and the original problem is somewhat fixed but still behaving incorrectly. The breakpoint gets triggered, highlights the right line in the editor and the call stack is correct. However it doesn't open up the original source file. Instead it opens up a file that is named the same but contains the generated JS code. Next to the file name it says "read-only core module". Pic enclosed. Note that I am using ts-node. |
Thanks for trying it @tkrein321, could you set Alternately if you can share your project that would help a lot too. |
Sorry, I can't share the project. Also I can't post the log file where it's public but I will email it to you. |
Also hitting this trying to debug someone elses code: To Reproduceclone this repo:
And add a breakpoint at 216 or 220 to
you have to fill in My breakpoints aren't getting hit! You'll see that yours won't be either. |
Issue Type: Bug
SmartStep is skipping my files in a nestjs application. Debug is working correctly but no yellow line is shown on breakpoints in any of my files and I can see in call stack that my functions are hidden (as anonymous) and skipped by SmartStep.
VS Code version: Code 1.31.0 (7c66f58, 2019-02-05T22:35:56.624Z)
OS version: Windows_NT x64 10.0.17763
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_off
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (13)
(2 theme extensions excluded)
The text was updated successfully, but these errors were encountered: