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

(Mac / Linux) node --inspect-brk with auto attach doesn't work #55918

Closed
octref opened this issue Aug 6, 2018 · 7 comments
Closed

(Mac / Linux) node --inspect-brk with auto attach doesn't work #55918

octref opened this issue Aug 6, 2018 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues linux Issues with VS Code on Linux macos Issues with VS Code on MAC/OS X verified Verification succeeded
Milestone

Comments

@octref
Copy link
Contributor

octref commented Aug 6, 2018

I'm on c2ddece with all extension disabled.
This does not happen on Windows.

  • Create index.js with the following content
    console.log('foo')
    console.log('bar')
  • Put a breakpoint on first line
  • Debug: Toggle Auto Attach to turn auto attach on
  • Run node --inspect-brk index.js
  • Editor do not enter debug mode and no breakpoint gets hit

Node Version: v8.9.2
macOS: High Sierra 10.13.6

@octref octref added debug Debug viewlet, configurations, breakpoints, adapter issues macos Issues with VS Code on MAC/OS X candidate Issue identified as probable candidate for fixing in the next release labels Aug 6, 2018
@octref octref added this to the July 2018 milestone Aug 6, 2018
@octref octref changed the title (Mac) node --inspect-brk with auto attach doesn't work (Mac / Linux) node --inspect-brk with auto attach doesn't work Aug 6, 2018
@octref octref added the linux Issues with VS Code on Linux label Aug 6, 2018
@octref
Copy link
Contributor Author

octref commented Aug 6, 2018

I was using Code 1.25 on Linux. Turned out this happens on both Mac and Linux.

@roblourens
Copy link
Member

I think this is from the terminal process changes. Auto attach looks for --type=terminal which doesn’t exist anymore so it’s completely broken on linux and mac. cc @Tyriar

@kieferrm kieferrm assigned weinand and Tyriar and unassigned weinand Aug 6, 2018
@Tyriar
Copy link
Member

Tyriar commented Aug 6, 2018

@roblourens that makes sense, processes are now spawned directly under the renderer process.

screen shot 2018-08-06 at 4 03 44 pm

@weinand let me know your thoughts, I don't think we should backtrack on the process layout. Perhaps looking for terminal processes by searching for the configured shell (terminal.integrated.shell.*) as a child of the renderer process?

@roblourens
Copy link
Member

Or just start looking under window.terminals, you can get the processId of a Terminal.

@weinand
Copy link
Contributor

weinand commented Aug 6, 2018

When has this changed? In the test pass last week we found that the process topology had changed for Windows and we fixed that. But macOS and linux was working fine.

@Tyriar
Copy link
Member

Tyriar commented Aug 6, 2018

@weinand merged 25 days ago #54090

@roblourens oh yeah, that's stable now 😄

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Aug 7, 2018
@weinand weinand closed this as completed in edfda96 Aug 7, 2018
@weinand
Copy link
Contributor

weinand commented Aug 7, 2018

Verification:

  • turn on auto-attach via the "Toggle Auto Attach" action
  • use a long-running node.js program "hello.js":
    var i = 0;
    setInterval(() => {
    	console.log('hello world ' + i++);
    }, 1000);
    
  • set a breakpoint in line 3
  • open integrated terminal
  • enter node --inspect hello.js

Debugger should hit breakpoint

@chrmarti chrmarti added the verified Verification succeeded label Aug 8, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 21, 2018
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 candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues linux Issues with VS Code on Linux macos Issues with VS Code on MAC/OS X verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants