-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
I think there are some changes from #217 here? If we are depending on that check-in first, it might be easier to complete that one and then rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's first time that I use the device simulator express debugger, it's awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool! 😁
…m/microsoft/vscode-python-devicesimulator into users/t-anmah/debugger-socket-fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I think the debugger is much more reliable than most other VS Code extensions. Awesome work!
@@ -34,6 +34,7 @@ export class DebugAdapter implements DebugAdapterTracker { | |||
if (!message.arguments.restart) { | |||
this.debugCommunicationService.handleStopEvent(); | |||
} | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also add a default case which would throw an UnsupportedOperationException
. Up to you.
if (this.previousDebuggerServerToDisconnect) { | ||
this.previousDebuggerServerToDisconnect.disconnectFromPort(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace lines 23~25 with:
this.previousDebuggerServerToDisconnect?.disconnectFromPort()
Same for other places.
Description:
Sometimes on restart, socket io does not get disconnected properly on the python side. Restarting it causes a problem since it will try to reconnect on the same port.
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please delete options that are not relevant.
Limitations:
Please describe limitations of this PR
Testing:
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
npm run format
and passes the checks innpm run check