Skip to content

freeze when using debugger on windows #763

@colmaengus

Description

@colmaengus

I'm seeing a problem where spawn freezes when using the node.js debugger under windows. Without the debugger it works just fine.
I've tested using 1.0.0 and v1.1.0-beta30 and the behavior is the same.

I have been using @cdktf/node-pty-prebuilt-multiarch:0.10.1-pre.11 until now and it was working fine. However I need to switch to a later version of node.js and these pre-builds don't work with node.js 23.
I've also tried @lydell/node-pty: 1.1.0 but the behavior is the same as the upstream node.pty.

This is the sample code I'm using. I'm using WebStorm for debugging.

const pty = require('node-pty');
const cmd = 'cmd.exe';
const args = [];
const options = {
  name: 'xterm-256color',
  cols: 80,
  rows: 30
};
console.log('before spawn');
const ptyProcess = pty.spawn(cmd, args, options);
console.log('after spawn');
ptyProcess.on('data', (data) => {
  process.stdout.write(data);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions