-
Notifications
You must be signed in to change notification settings - Fork 235
The entire Debug Adapter moved over... #1043
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
The entire Debug Adapter moved over... #1043
Conversation
a8b00f3
to
903f4fc
Compare
@@ -20,9 +20,9 @@ the PowerShell debugger. | |||
Use the @Microsoft.PowerShell.EditorServices.Console.ConsoleService to provide interactive | |||
console support in the user's editor. | |||
|
|||
Use the @Microsoft.PowerShell.EditorServices.Extensions.ExtensionService to allow | |||
Use the @Microsoft.PowerShell.EditorServices.Engine.Services.ExtensionService to allow |
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.
What are the @
s here?
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.
Not 100% sure but since this use to be a docfx website, there might be some special syntax with that.
@@ -41,7 +41,7 @@ function New-VSCodeHtmlContentView { | |||
) | |||
|
|||
process { | |||
if ($psEditor -is [Microsoft.PowerShell.EditorServices.Extensions.EditorObject]) { | |||
if ($psEditor -is [Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext.EditorObject]) { |
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.
I feel like if we're keeping the extensions concept, it should be given a friendly namespace of its own that doesn't depend on the implementation detail of the PowerShellContext service. But not a huge thing for this PR
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.
Yeah I agree.
src/PowerShellEditorServices.Engine/Hosting/EditorServicesHost.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices.Engine/Services/DebugAdapter/DebugEventHandlerService.cs
Outdated
Show resolved
Hide resolved
/// <summary> | ||
/// Provides a constant for the name of the Global scope. | ||
/// </summary> | ||
public const string AutoVariablesName = "Auto"; |
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.
Is this a thing?
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.
I have seen "auto" in the variable pane of debugging. I'm not sure if that's something vscode defines that we are mirroring here or what.
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.
Auto
was our attempt to mirror what the Visual Studio debugger provides where it lists the variables it thinks are most relevant in the current debug context (stack frame). This worked better when the debugger was a traditional, non-REPL set up. But now that we execute scripts by dot sourcing them this feature is less useful because all script level variables wind up in the global scope along with dozens of other variables. We could make this work better in the dot source case by taking a "snapshot" of global variables when the session first starts, then Auto
would show variables not in that original "global variables" snapshot and variables that are but whose values have changed.
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.
When it works, it is a very useful feature.
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.
Yeah thats sounds like the right direction to move in. I'll call it out of scope for this PR, but if you don't mind open a quick issue to capture this I'd appreciate it!
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.
Done. #1045
@@ -70,6 +71,11 @@ public async Task InitializeAsync() | |||
"-Stdio" | |||
}; | |||
|
|||
if (IsDebugAdapterTests) |
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.
If this is intended for a particular subclass, ideally the superclass shouldn't know about it at all. But in test classes, not such a big deal
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.
yeah this isn't final. There's more work I need to do wrt testing.
Co-Authored-By: Robert Holt <[email protected]>
* initial non-working dap * working launch but not attach * working attach handler * update namespaces * Disconnect support and handling of JsonRpcServer teardown * Add foundation for debug tests - stdio and fixures * all handlers * remote file manager working * rest of debug adapter * use actual release * Apply suggestions from code review Co-Authored-By: Robert Holt <[email protected]>
* Add starting point * x * More work * Make integration tests pass for omnisharp * Changes * add dummy workspace symbols handler * use LoggerFactory * A working WorkspaceSymbolsHandler * working text document syncer * needed document selector and getVersion handler to work with vscode * Added Diagnostics * didChangeConfiguration message and general settings support * Add diagnostics (#18) * initial folding support * added test for folding * Add setting support (#19) * Added Diagnostics * didChangeConfiguration message and general settings support * Apply suggestions from code review Co-Authored-By: Robert Holt <[email protected]> * Folding support (#20) * Added Diagnostics * didChangeConfiguration message and general settings support * initial folding support * log level trace * folding works with latest omnisharp version * comment typo * added test for folding * formatting support * remove merge conflict * add formatting tests * DocumentSymbols and References support (#997) * working formatting * add tests * delete commented out code * [Omnisharp-LSP] textDocument/documentHighlight support (#999) * Add handler scaffold * More stuff * Make handler work * Add copyright * Add tests, fix bugs * Fix small issues * codelens support (#1001) * codelens support * address rob's feedback * powerShell/getPSHostProcesses and powerShell/getRunspace (#1002) * Test only pester for now (#1003) * Implement textDocument/codeAction (#1004) * Add initial handler * Add working codeAction implementation * Crash * Make tests work * Fix issues * Make tests work in WinPS * Add powershellcontext (#1005) * Add powershellcontext * using file sink now instead * all the newlines * support $psEditor (#1006) * support $psEditor * deleted commented out code * fix initial build failures due to lack of certain assemblies * use different RootPath * wait an extra 5 seconds just in case * refactor initialize script * Re-add Stdio option and replace Pester tests with xunit tests. (#1008) * Completion Support (#1007) * completion support * misc codacy fixes * use BUILD_ARTIFACTSTAGINGDIRECTORY so logs can be uploaded * publish artifacts even if build fails * handle log messages * give PSES a chance to run what it needs to run * switch to using xUnit output helper * treat DynamicKeywords as Keyword * completionresolve support (#1009) * handle log messages * switch to using xUnit output helper * Add completionItem/resolve request * feedback * update build to run update-help for signature help test * removing scope hoping it works in CI * setting to EA silentlycontinue * change to language=powershell * hover support (#1010) * handle log messages * switch to using xUnit output helper * add hover handler * move to language=powershell * refactoring for feedback * codacy * Omni signaturehelp (#1011) * handle log messages * switch to using xUnit output helper * Support SignatureHelp * concurrentdict * Add definition handler (#1013) * add definition handler * codacy * sneak in powerShell/executionStatusChanged * codacy * Add Plaster messages (#1014) * Comment Help and Evaluate (#1015) * Support for Comment Help generator * add evaluate handler * Last LSP messages (#1016) * support CommandExporer commands and powerShell/runspaceChanged * expand alias * refactor server setup (#1018) * rename namespaces (#1019) * The entire Debug Adapter moved over... (#1043) * initial non-working dap * working launch but not attach * working attach handler * update namespaces * Disconnect support and handling of JsonRpcServer teardown * Add foundation for debug tests - stdio and fixures * all handlers * remote file manager working * rest of debug adapter * use actual release * Apply suggestions from code review Co-Authored-By: Robert Holt <[email protected]> * Delete projects we wont be keeping around and get pses.vscode working again (#1046) * delete other folders and tweak build script for BuildInfo * working PowerShellEditorServices.VSCode now a binary module! * some typo * Apply suggestions from code review Co-Authored-By: Patrick Meinecke <[email protected]> * address additional comments * don't checkin maml * add error handling * deleted buildinfo and address rob's comments * Remove engine from files and namespaces (#1048) * apply apt state for PS7 (#1051) * delete buildinfo * implement powerShell/startDebugger (#1049) * implement powerShell/startDebugger * add line Co-Authored-By: Patrick Meinecke <[email protected]> * Enable alias corrections (#1053) * Codacy comments
This is a big PR... I know.