feat(debugger): integrate NX Tcl Remote Debugger into NX Postprocessor
build_and_puplish.yml / build_and_publish (release) Successful in 35s

Embed the NX Tcl Remote Debugger into the NX Postprocessor extension.
Add a new debugging client, protocol, and adapter logic to
drive attach/launch, breakpoints, stepping, and evaluation
via the runtime adapter.

- Introduced a client debugger with a new adapter and protocol
- Wired attach/launch, breakpoints, stepping, and evaluation
- Updated docs and licensing to reflect the embedded debugger
This commit is contained in:
Christoph Brandau
2026-08-28 22:36:18 +02:00
parent 07ccd2d26a
commit c3d5116885
12 changed files with 1135 additions and 10 deletions
+42
View File
@@ -0,0 +1,42 @@
import * as vscode from "vscode"
// The adapter is shared with the standalone NX Tcl Remote Debugger. It is
// bundled by esbuild into this extension, so no child process or additional
// VS Code extension is required.
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { NxInlineDebugAdapter } = require("./inlineAdapter")
class NxDebugAdapterFactory implements vscode.DebugAdapterDescriptorFactory {
createDebugAdapterDescriptor(): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
return new vscode.DebugAdapterInlineImplementation(new NxInlineDebugAdapter())
}
}
function resolveDebugConfiguration(
folder: vscode.WorkspaceFolder | undefined,
config: vscode.DebugConfiguration
): vscode.DebugConfiguration {
const resolved = { ...config }
if (!resolved.type) resolved.type = "nx-tcl"
if (!resolved.request) resolved.request = "attach"
if (!resolved.name) resolved.name = "Attach to NX Post Tcl"
if (!resolved.host) resolved.host = "127.0.0.1"
if (!resolved.port) resolved.port = 4711
if (!resolved.connectTimeout) resolved.connectTimeout = 120000
if (resolved.stopOnEntry === undefined) resolved.stopOnEntry = false
if (resolved.breakOnError === undefined) resolved.breakOnError = true
if (!resolved.localRoot && folder) resolved.localRoot = folder.uri.fsPath
return resolved
}
export function registerNxTclDebugger(context: vscode.ExtensionContext): void {
const factory = new NxDebugAdapterFactory()
context.subscriptions.push(
vscode.debug.registerDebugAdapterDescriptorFactory("nx-tcl", factory),
vscode.debug.registerDebugConfigurationProvider("nx-tcl", {
resolveDebugConfiguration
})
)
}
export { resolveDebugConfiguration }