Skip to content

Commit 15f65cf

Browse files
committed
Add attachDotnetDebugger debug option
Extract processId Fetch Cleanup legacy bad rebase Revert breakout config Add dotnetDebuggerConfigName info TODO the workspace folder support Fix typo Cleanup flow and breakout temporary console to dedicated functions Add handlers to cleanup dotnet attach Fix linting issues Refactor one-time event disposal using variable scope demonry Clarify the handlers Remove Disposable (lint fix) Add initial test Lint fix Fix description to use correct and more specific terminology. Co-authored-by: Andy Jordan <[email protected]> Apply suggestions from @andschwa review Fixed E2E Debug Testing Remove Only Add initial Debug test scaffolding Remove "only" Move validation logic to resolve functions and implement first resolve test Rearrange methods with public first and implementation details last, in order of implemented interfaces. Add more tests Fixed positioning of resolvesubstitutedvariables, now the public methods happen in the order they are called Populate more tests Some more scaffoldng and a broken test Add optional attach port to runTests and remove only *again* Fix wrong argv for port Add check for PSES Binaries Adjust StubInterface to use Partial to preserve intellisense More test fixes Fix test names to be consistent with other tests More specific error checks and implement structuredClone Add structuredclone to dev dependencies Revert accidental commit of new build tasks Update package.json Co-authored-by: Andy Jordan <[email protected]> Enable ESModuleInterop and fix related issues Updated structuredclone import to ES6 syntax Add ESModuleInterop to tsconfig.json More test adds and add newlines between Arrange Act Assert More test scaffolding ESModuleInterop fixes Bump package-lock More esModuleInterop fixes Tests TESTS TESTS TESTS TESTS Flaky Test Check Move testing default folder to examples Add binary module example and C# extension fetching Add precompiled binarymodule so that it doesnt have to be built for testing Fix pid for ProcessID Add first binary module E2E test Suppress first run messages in examples folder Remove Only Add createDebugAdapterDescriptor test Remove Only Move working dir back to test (was breaking settings tests) and add dummy csproj for C# activation Move dummy to mocks folder Reload window for CI Fix assertion order in binary module test Skip Mac on binary module script test for now Fix bug where stdout is null if CLI install fails Extract CSharp extension install to separate function for DAMP clarity Add test if C# extension was found Remove imports More MacOS troubleshooting (7 minute cycles between tests is hell) More troubleshooting lines Add hack to change cwd to make resolveCliArgs happy Found out the electron extensions run in a whole separate process on MacOS, handle that Re-enable resolveCliArgs detection problem fix Remove error reference Try without window reload Remove Async from InstallCSharpExtension Remove more async Wait for C# extension to load rather than just reloading the window More binary module test scaffolding End to End Tests Done! 🎉🎉🎉 Spoke too soon, find out why CI breakpoint test fails (probably because it might be headless) Add undefined checks Build test binary module locally to avoid absolute PDB path issues MacOS why you gotta be such a PIA Remove dummy csproj, maybe MacOS search was a flake Try reload window on mac Move MacOS C# install to before tests to avoid test duplications Fix reload loop on mac Remove reload from initial Add some debugging to try to find macos issue Move event registration to before startDebugging Try increasing timeout for MacOS Add WaitEvent helper function Try MacOS Hot Install Again Retry: RunCode test seems to be flaky Change exec to spawn to make CodeQL happy Revert "Change exec to spawn to make CodeQL happy" This reverts commit d3aea33.
1 parent 068d52e commit 15f65cf

18 files changed

+949
-113
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ logs/
33
modules
44
modules/
55
node_modules/
6+
obj/
7+
bin/
68
out/
79
sessions/
810
test/.vscode/

examples/.vscode/settings.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
// Use a custom PowerShell Script Analyzer settings file for this workspace.
33
// Relative paths for this setting are always relative to the workspace root dir.
44
"powershell.scriptAnalysis.settingsPath": "./PSScriptAnalyzerSettings.psd1",
5-
"files.defaultLanguage": "powershell"
5+
"files.defaultLanguage": "powershell",
6+
// Suppresses some first-run messages
7+
"git.openRepositoryInParentFolders": "never",
8+
"csharp.suppressDotnetRestoreNotification": true,
9+
"extensions.ignoreRecommendations": true
610
}

package-lock.json

+28-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+12
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@
9090
"@types/rewire": "2.5.28",
9191
"@types/semver": "7.3.13",
9292
"@types/sinon": "10.0.13",
93+
"@types/ungap__structured-clone": "^0.3.0",
9394
"@types/uuid": "9.0.1",
9495
"@types/vscode": "1.67.0",
9596
"@typescript-eslint/eslint-plugin": "5.57.0",
9697
"@typescript-eslint/parser": "5.57.1",
98+
"@ungap/structured-clone": "^1.0.2",
9799
"@vscode/test-electron": "2.3.0",
98100
"@vscode/vsce": "2.18.0",
99101
"esbuild": "0.17.15",
@@ -522,6 +524,16 @@
522524
"type": "boolean",
523525
"description": "Determines whether a temporary PowerShell Extension Terminal is created for each debugging session, useful for debugging PowerShell classes and binary modules. Overrides the user setting 'powershell.debugging.createTemporaryIntegratedConsole'.",
524526
"default": false
527+
},
528+
"attachDotnetDebugger": {
529+
"type": "boolean",
530+
"description": "If specified, a C# debug session will be started and attached to the new temporary extension terminal. This does nothing unless 'powershell.debugging.createTemporaryIntegratedConsole' is also specified.",
531+
"default": false
532+
},
533+
"dotnetDebuggerConfigName": {
534+
"type": "string",
535+
"description": "If you would like to use a custom coreclr attach debug launch configuration for the debug session, specify the name here. Otherwise a default basic config will be used. The config must be a coreclr attach config. Launch configs are not supported.",
536+
"default": false
525537
}
526538
}
527539
},

0 commit comments

Comments
 (0)