Skip to content
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

Javascript debugger breaks on 1.58 #128400

Closed
Scrandre opened this issue Jul 11, 2021 · 17 comments
Closed

Javascript debugger breaks on 1.58 #128400

Scrandre opened this issue Jul 11, 2021 · 17 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Scrandre
Copy link

Scrandre commented Jul 11, 2021

Issue Type: Bug

After many hours of trying to understand what's going on I have to downgrade and stay on 1.57.1 because if I update to 1.58 my Node.js debugging breaks:
Smart auto-attach stops working but that's just the surface and is not the problem,
If I manually attach the debugger it works until the first pause and then the debug log stops working - it doesn't output or even allow to input anything (even "true" doesn't return anything, in the VS Code's Dev Console I see "Unknown request: evaluate" errors), auto-suggestions don't work either
For some of my projects it doesn't work from the very start

I tried to disable all extensions, it did not change anything,

I've tried reinstalling node from NVM (that I use) to the standalone installer, it didn't change anything, the only thing that helped consistently is downgrading to 1.57.1, and upgrading to 1.58 breaks it as consistently

The Node.js version I use is 12.18.3,

Another thing I've noticed that doesn't work on both 1.57.1 and 1.58 is the process restart button, 1.57.1 doesn't react to it besides clearing the debug log, and 1.58 debug log breaks similar to the aforementioned pausing

Turning off the preview debugger didn't change anything on both versions

VS Code version: Code 1.57.1 (507ce72, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.18363
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 x 2496)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.89GB (18.79GB free)
Process Argv --crash-reporter-id 1c90d51e-3e96-4d9d-85be-0615af61014e
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt700cf:30270857
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
vspre833:30321513
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255:30335481
vscorehov:30309549
vscod805:30301674
pythonvspyt200:30331937
vscextlangct:30333562
binariesv615:30325510
vsccppwtct:30329789
vstea450:30335276
bridge0708:30335490

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 11, 2021
@weinand weinand assigned connor4312 and unassigned connor4312 and weinand Jul 11, 2021
@connor4312
Copy link
Member

connor4312 commented Jul 12, 2021

First off I suggest updating your Node version. 12.22.3 is the latest 12.x; there were some previous versions in the 12.x which had random freeze issues during debugging, and I think 12.18 was among them. Alternately you could update to 16.x for the very latest and greatest.

If that doesn't fix the issue, please try collecting a trace log using these instructions:

/jsDebugLogs

@baybal
Copy link

baybal commented Jul 19, 2021

#126704

@baybal
Copy link

baybal commented Jul 19, 2021

1.58, and node 16.5 REPL broken on debugging over SSH

@baybal
Copy link

baybal commented Jul 19, 2021

1.57.1 still working

Can we have a list of things which changed regarding debugging in between 1.57.1 and 1.68 ?

@baybal
Copy link

baybal commented Jul 19, 2021

How it looks on 1.58 for me:

  1. Launch a debugging session over SSH
  2. Debugger attaches
  3. Console.log output is visible
  4. But when I try to enter anything into REPL console, nothing happens
  5. When I stop the debugging session, there is Cancelled written into the REPL console the number of times I tried to enter something into it

@baybal
Copy link

baybal commented Jul 19, 2021

REPL console suggestion are also not displayed. Ctrl+space shows Loading popup, but nothing is shown.

@baybal
Copy link

baybal commented Jul 19, 2021

image

@baybal
Copy link

baybal commented Jul 19, 2021

@connor4312 I uploaded trace to https://microsoft.github.io/vscode-pwa-analyzer/index.html vscode-debugadapter-edb3aba5.json.gz

@baybal
Copy link

baybal commented Jul 19, 2021

@baybal
Copy link

baybal commented Jul 19, 2021

image

@connor4312
Copy link
Member

@isidorn it looks like in Baybal's case, the evaluate requests are only sent to the root debug session which does not do anything. Was there a change made that caused these to no longer be sent to the child?

@isidorn
Copy link
Contributor

isidorn commented Jul 26, 2021

@connor4312 I am not aware of a change that would directly cause this. Though I was on vacation so I might have forgot.
Are there some repro steps?

@connor4312
Copy link
Member

Sure:

  1. Have any JavaScript program that runs for a while. Don't hit any breakpoints
  2. Enter 2 + 2 in the console. There's no output (this is going to the parent session)
  3. Click on the session in the Call Stack view or hit a breakpoint to focus it
  4. Enter 2 + 2 again. Now you get back 4 since it goes to the right session

@isidorn
Copy link
Contributor

isidorn commented Jul 27, 2021

Thanks for steps, assigning to July so I try to look into this issue this week.

@isidorn isidorn removed the info-needed Issue requires more information from poster label Jul 27, 2021
@isidorn isidorn added this to the July 2021 milestone Jul 27, 2021
@isidorn
Copy link
Contributor

isidorn commented Jul 28, 2021

I tried to repro this and could not. Here are my steps (following yours).
This javascript file, no breakpoints:

setInterval(() => {
    console.log('how is it going')
}, 1000);

Start debugging
Click in console, 2 + 2 = gets evaluated to 4

@connor4312 what are you doing differently?

Do I do agree that my changes from this issue #125144 might have caused a regression here

@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Jul 29, 2021
@isidorn
Copy link
Contributor

isidorn commented Jul 29, 2021

Verification steps:

setInterval(() => {
    console.log('how is it going')
}, 1000);

Put a breakpoint on second line, start debugging hit a breakpoint.
Remove a breakpoint, hit contine
Evaluate 2 + 2 in the debug console, make sure you get the result

@roblourens roblourens added the verified Verification succeeded label Jul 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@roblourens @weinand @isidorn @connor4312 @baybal @Scrandre and others