Skip to content

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented Jan 16, 2017

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.

@daviwil daviwil added this to the 0.9.0 milestone Jan 16, 2017
scriptFile = editorSession.Workspace.GetFile(setBreakpointsParams.Source.Path);
}
catch (FileNotFoundException)
catch (DirectoryNotFoundException e)
Copy link
Contributor

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;
}

Copy link
Contributor Author

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.

Copy link
Contributor

@rkeithhill rkeithhill left a 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.

@daviwil
Copy link
Contributor Author

daviwil commented Jan 17, 2017

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.
@daviwil daviwil force-pushed the daviwil/remote-file-open branch from 10539ad to 62f1e5b Compare January 18, 2017 05:11
@daviwil daviwil merged commit 1fce255 into develop Jan 18, 2017
@daviwil daviwil deleted the daviwil/remote-file-open branch January 18, 2017 05:17
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

Successfully merging this pull request may close these issues.

4 participants