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

Please add .shell-like functionality to the Debugger Data Model #213

Open
JamesMcNellis opened this issue Aug 2, 2024 · 0 comments
Open

Comments

@JamesMcNellis
Copy link

I have a JavaScript debugger extension. From it, I would like to start another program.

Currently, I am using ExecuteCommand to run .shell to start the program. This mostly works. However, if the program runs for more than ten seconds, the debugger gets "stuck," with the command window waiting for "Input>".

Repro Steps:

  1. Create a new JavaScript imperative extension with the following contents:
"use strict";

function initializeScript()
{
    return [new host.apiVersionSupport(1, 9)];
}

function invokeScript()
{
    host.namespace.Debugger.Utility.Control.ExecuteCommand('.shell -ci "*" powershell -Command "Start-Sleep -Seconds 15"');
}
  1. Run the script
  2. Wait 15 seconds

Observe that the debugger is now stuck waiting for input.

If we run the .shell directly in the command window, we can see what the problem is:

0:022> .shell -ci "*" powershell -Command "Start-Sleep -Seconds 15"
<.shell waiting 10 second(s) for process>
<.shell running: .shell_quit to abandon, ENTER to wait>.shell: Process exited

However, when running the command from a script, the output from .shell is not printed to the command window so there is no indication as to why things are stuck.

It would be nice if the Debugger Data Model just exposed something similar to ExecuteCommand that can be used to run another program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant