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

Do not rely on "processId" being returned by "runInTerminal" request #1678

Closed
int19h opened this issue Aug 11, 2019 · 0 comments

Comments

@int19h
Copy link
Contributor

commented Aug 11, 2019

VSCode does not return "processId" from "runInTerminal" requests: microsoft/vscode#61640

Thus, support for "console":"integratedTerminal" and "console":"externalTerminal" cannot rely on that - it has to retrieve the PID from the "process" event sent by the debug server, and gracefully handle situations where the debuggee exits or crashes before it gets a chance to send it.

@int19h int19h self-assigned this Aug 11, 2019

int19h added a commit to int19h/ptvsd that referenced this issue Aug 11, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit to int19h/ptvsd that referenced this issue Aug 12, 2019

Fix microsoft#1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix microsoft#1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix microsoft#1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix microsoft#1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

int19h added a commit that referenced this issue Aug 12, 2019

Fix #1648: Messaging does not allow reverse requests
Separate message parsing and message handling into separate threads.

Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.

Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.

Fix #1678: Do not rely on "processId" being returned by "runInTerminal" request

Extract debuggee PID from the "process" event sent by the debug server.

Fix #1679: "exited" event sometimes reports "exitCode": null

Report it as -1 if it cannot be retrieved from the debuggee process.

Fix #1680: Fatal errors in message loop do not fail fast

os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.

@int19h int19h closed this Aug 12, 2019

@karthiknadig karthiknadig added this to the Aug 2019.1 milestone Aug 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.