-
Notifications
You must be signed in to change notification settings - Fork 236
Implement psedit command for remote file loading #337
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
Conversation
|
||
// Fix for issue #195 - user can change name of file outside of VSCode in which case | ||
// VSCode sends breakpoint requests with the original filename that doesn't exist anymore. | ||
try | ||
{ | ||
scriptFile = editorSession.Workspace.GetFile(setBreakpointsParams.Source.Path); | ||
} | ||
catch (FileNotFoundException) | ||
catch (DirectoryNotFoundException e) |
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 use:
catch (Exception ex) when (ex is FileNotFoundException || ex is DirectoryNotFoundException)
{
notFoundException = ex;
}
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.
Hah! Yep, haven't had a chance to use that one yet.
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.
Cool new functionality! Firing an event from PowerShell and catching it in C# - nice. The Logger.WriteException() methods should be handy as well.
Doesn't work in all cases yet unfortunately. Seems that either PowerShell isn't forwarding the event all the way from nested sessions (debugging a runspace in a local or remote process) back to the local session. I'll have to bug somebody about that today. |
This change adds new behavior to RemoteFileManager so that a 'psedit' command will be added to all sessions for the purpose of loading local or remote files in the debugging experience. For now the remotely opened files do not have new contents propagated to the remote machine but that will be added shortly.
This change adds the !ctrlc and !break commands which are special to the debug adapter's REPL interface. The provide the ability to send a Ctrl+C (abort) or Ctrl+B (break) at any time. This is necessary because the debugger UI can't properly handle or transfer these commands in some cases.
10539ad
to
62f1e5b
Compare
This change adds new behavior to RemoteFileManager so that a 'psedit'
command will be added to all sessions for the purpose of loading local or
remote files in the debugging experience. For now the remotely opened
files do not have saved contents propagated to the remote machine but that
will be added shortly.