├── .ci ├── common-validation.yml ├── pipeline.yml ├── publish-nightly.yml └── publish.yml ├── .eslintrc.js ├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── other.md ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── .mocharc.unit.js ├── .nvmrc ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── COMMON_PROBLEMS.md ├── CONTRIBUTING.md ├── CodeQL.yml ├── EXTENSION_AUTHORS.md ├── LICENSE ├── OPTIONS.md ├── README.md ├── README.nightly.md ├── SECURITY.md ├── dprint.json ├── gulpfile.js ├── package-lock.json ├── package.json ├── package.nls.json ├── resources ├── dark │ ├── configure.svg │ ├── connect.svg │ ├── disconnect.svg │ ├── node.svg │ ├── open-file.svg │ ├── page.svg │ ├── pause.svg │ ├── restart.svg │ ├── resume.svg │ ├── service-worker.svg │ ├── stop-profiling.svg │ ├── stop.svg │ └── worker.svg ├── light │ ├── configure.svg │ ├── connect.svg │ ├── disconnect.svg │ ├── node.svg │ ├── open-file.svg │ ├── page.svg │ ├── pause.svg │ ├── restart.svg │ ├── resume.svg │ ├── service-worker.svg │ ├── stop.svg │ └── worker.svg ├── logo.png ├── logo.svg └── readme │ ├── auto-attach.png │ ├── conditional-exception-breakpoints.png │ ├── exclude-caller.png │ ├── flame-chart.png │ ├── instrumentation-breakpoints.png │ ├── instrumentation-breakpoints2.png │ ├── logo-with-text.png │ ├── network-view.png │ ├── pretty-print.png │ ├── returnvalue.png │ ├── top-level-await.png │ ├── wasm-dwarf.png │ ├── web-worker.png │ └── webview2.png ├── src ├── adapter │ ├── asyncStackPolicy.ts │ ├── breakpointPredictor.ts │ ├── breakpoints.ts │ ├── breakpoints │ │ ├── breakpointBase.ts │ │ ├── conditions │ │ │ ├── expression.ts │ │ │ ├── hitCount.ts │ │ │ ├── index.ts │ │ │ ├── logPoint.ts │ │ │ ├── runtimeLogPoint.ts │ │ │ └── simple.ts │ │ ├── entryBreakpoint.ts │ │ ├── neverResolvedBreakpoint.ts │ │ ├── patternEntrypointBreakpoint.ts │ │ └── userDefinedBreakpoint.ts │ ├── cdpProxy.pdl │ ├── cdpProxy.test.ts │ ├── cdpProxy.ts │ ├── clientCapabilities.ts │ ├── completions.ts │ ├── console │ │ ├── console.ts │ │ ├── consoleMessage.ts │ │ ├── exceptionMessage.ts │ │ ├── index.ts │ │ ├── queryObjectsMessage.ts │ │ ├── reservationQueue.test.ts │ │ ├── reservationQueue.ts │ │ └── textualMessage.ts │ ├── customBreakpoints.ts │ ├── debugAdapter.ts │ ├── diagnosics.ts │ ├── diagnosticToolSuggester.ts │ ├── dwarf │ │ ├── dwarfModuleProvider.ts │ │ ├── dwarfModuleProviderImpl.ts │ │ └── wasmSymbolProvider.ts │ ├── evaluator.test.ts │ ├── evaluator.ts │ ├── exceptionPauseService.test.ts │ ├── exceptionPauseService.ts │ ├── messageFormat.ts │ ├── objectPreview │ │ ├── betterTypes.ts │ │ ├── contexts.ts │ │ └── index.ts │ ├── pause.ts │ ├── performance │ │ ├── browserPerformanceProvider.ts │ │ ├── index.ts │ │ └── nodePerformanceProvider.ts │ ├── portLeaseTracker.test.ts │ ├── portLeaseTracker.ts │ ├── profileController.ts │ ├── profiling │ │ ├── basicCpuProfiler.ts │ │ ├── basicHeapProfiler.ts │ │ ├── heapDumpProfiler.ts │ │ ├── index.ts │ │ └── sourceAnnotationHelper.ts │ ├── resourceProvider │ │ ├── basicResourceProvider.ts │ │ ├── helpers.ts │ │ ├── httpError.ts │ │ ├── index.ts │ │ ├── requestOptionsProvider.ts │ │ └── statefulResourceProvider.ts │ ├── scriptSkipper │ │ ├── implementation.ts │ │ ├── scriptSkipper.ts │ │ ├── simpleGlobToRe.test.ts │ │ └── simpleGlobToRe.ts │ ├── selfProfile.ts │ ├── smartStepping.ts │ ├── source.ts │ ├── sourceContainer.ts │ ├── stackTrace.ts │ ├── templates │ │ ├── breakOnWasm.ts │ │ ├── enumerateProperties.ts │ │ ├── getArrayProperties.ts │ │ ├── getArraySlots.ts │ │ ├── getNodeChildren.ts │ │ ├── getStringyProps.ts │ │ ├── index.ts │ │ ├── invokeGetter.ts │ │ ├── previewThis.ts │ │ ├── readMemory.ts │ │ ├── serializeForClipboard.ts │ │ └── writeMemory.ts │ ├── threads.ts │ ├── variableStore.ts │ └── vueFileMapper.ts ├── binder.ts ├── build │ ├── .gitignore │ ├── archiveDapBundle.js │ ├── dapCustom.ts │ ├── documentReadme.ts │ ├── esbuildPlugins.js │ ├── generate-contributions.ts │ ├── generateCdp.ts │ ├── generateDap.ts │ ├── generateUtils.ts │ ├── getJsDebugPdl.py │ ├── getNodePdl.py │ ├── jsDebugCustom.ts │ ├── nodeCustom.ts │ └── wasmCustom.ts ├── cdp │ ├── api.d.ts │ ├── connection.ts │ ├── nullTransport.ts │ ├── protocol.ts │ ├── rawPipeTransport.ts │ ├── stubbedApi.ts │ ├── telemetryClassification.d.ts │ ├── transport.ts │ ├── webSocketTransport.ts │ └── workerTransport.ts ├── common │ ├── arrayUtils.test.ts │ ├── arrayUtils.ts │ ├── budgetStringBuilder.ts │ ├── cancellation.ts │ ├── console.ts │ ├── contributionUtils.ts │ ├── datastructure │ │ ├── linkedList.test.ts │ │ ├── linkedList.ts │ │ ├── mapUsingProjection.ts │ │ ├── multimap.test.ts │ │ ├── multimap.ts │ │ └── observableMap.ts │ ├── defaultBrowserProvider.ts │ ├── disposable.ts │ ├── environmentVars.test.ts │ ├── environmentVars.ts │ ├── events.ts │ ├── fileGlobList.ts │ ├── findOpenPort.ts │ ├── findOpenPortSync.test.ts │ ├── findOpenPortSync.ts │ ├── fsUtils.ts │ ├── hash │ │ ├── checkContentHash.ts │ │ ├── hash.ts │ │ ├── index.test.ts │ │ └── index.ts │ ├── hrnow.ts │ ├── int32Counter.ts │ ├── knownTools.ts │ ├── l10n.extensionOnly.ts │ ├── logging │ │ ├── fileLogSink.ts │ │ ├── index.ts │ │ ├── logger.ts │ │ ├── proxyLogSink.ts │ │ ├── proxyLogger.ts │ │ ├── stdoutLogSink.ts │ │ └── testLogSink.ts │ ├── mutableLaunchConfig.ts │ ├── networkEvents.ts │ ├── node15Internal.ts │ ├── objUtils.test.ts │ ├── objUtils.ts │ ├── pathUtils.ts │ ├── positions.test.ts │ ├── positions.ts │ ├── processArgs.ts │ ├── processUtils.ts │ ├── promiseUtil.ts │ ├── random.ts │ ├── semver.ts │ ├── sourceCodeManipulations.test.ts │ ├── sourceCodeManipulations.ts │ ├── sourceMaps │ │ ├── cacheTree.ts │ │ ├── renameProvider.ts │ │ ├── renameScopeAndSourceMap.ts │ │ ├── renameScopeTree.test.ts │ │ ├── renameScopeTree.ts │ │ ├── renameWorker.ts │ │ ├── sourceMap.test.ts │ │ ├── sourceMap.ts │ │ ├── sourceMapFactory.test.ts │ │ ├── sourceMapFactory.ts │ │ ├── sourceMapRepository.ts │ │ ├── sourceMapResolutionUtils.ts │ │ ├── turboGlobStream.test.ts │ │ ├── turboGlobStream.ts │ │ └── turboSearchStrategy.ts │ ├── sourcePathResolver.ts │ ├── sourceUtils.test.ts │ ├── sourceUtils.ts │ ├── stackTraceParser.test.ts │ ├── stackTraceParser.ts │ ├── streamSplitter.test.ts │ ├── streamSplitter.ts │ ├── stringUtils.test.ts │ ├── stringUtils.ts │ ├── terminalLinkProvider.ts │ ├── urlUtils.test.ts │ ├── urlUtils.ts │ └── win32Utils.ts ├── configuration.ts ├── dap │ ├── api.d.ts │ ├── connection.ts │ ├── error.d.ts │ ├── errors.ts │ ├── logOmittedCalls.ts │ ├── pending-api.ts │ ├── protocolError.ts │ ├── stubbedApi.ts │ ├── telemetryClassification.d.ts │ └── transport.ts ├── dapDebugServer.ts ├── debugServer.ts ├── debugServerMain.ts ├── diagnosticTool │ ├── breakpointHelper.tsx │ ├── decisionButtons.tsx │ ├── diagnosticPaths.ts │ ├── diagnosticTool.css │ ├── diagnosticTool.tsx │ ├── index.ts │ ├── intro.tsx │ ├── sourceExplorer.tsx │ ├── useDump.ts │ └── usePersistentState.tsx ├── extension.ts ├── flatSessionLauncher.ts ├── ioc-extras.ts ├── ioc.ts ├── serverSessionManager.ts ├── sessionManager.ts ├── statistics │ └── breakpointsStatistics.ts ├── targets │ ├── browser │ │ ├── blazorSourcePathResolver.ts │ │ ├── browserArgs.ts │ │ ├── browserAttacher.ts │ │ ├── browserLaunchParams.ts │ │ ├── browserLauncher.ts │ │ ├── browserPathResolver.test.ts │ │ ├── browserPathResolver.ts │ │ ├── browserTargetManager.ts │ │ ├── browserTargets.ts │ │ ├── chromeLauncher.ts │ │ ├── constructInspectorWSUri.ts │ │ ├── edgeLauncher.ts │ │ ├── frames.ts │ │ ├── launcher.ts │ │ ├── remoteBrowserAttacher.ts │ │ ├── remoteBrowserHelper.ts │ │ ├── remoteBrowserLauncher.ts │ │ ├── serviceWorkers.ts │ │ ├── spawn │ │ │ ├── browserProcess.ts │ │ │ └── endpoints.ts │ │ ├── unelevatedChome.ts │ │ ├── uwpWebviewBrowserAttacher.ts │ │ ├── vscodeRendererAttacher.ts │ │ └── vscodeRendererTargetManager.ts │ ├── delegate │ │ ├── delegateLauncher.ts │ │ └── delegateLauncherFactory.ts │ ├── node │ │ ├── autoAttachLauncher.ts │ │ ├── bootloader.ts │ │ ├── bootloader │ │ │ ├── environment.ts │ │ │ ├── filters.ts │ │ │ └── logger.ts │ │ ├── bundlePaths.ts │ │ ├── callback-file.ts │ │ ├── createTargetId.ts │ │ ├── extensionHostAttacher.ts │ │ ├── extensionHostExtras.ts │ │ ├── extensionHostLauncher.ts │ │ ├── findOpenPort.ps1 │ │ ├── killTree.ts │ │ ├── lease-file.ts │ │ ├── nodeAttacher.ts │ │ ├── nodeAttacherBase.ts │ │ ├── nodeAttacherCluster.ts │ │ ├── nodeBinaryProvider.test.ts │ │ ├── nodeBinaryProvider.ts │ │ ├── nodeLauncher.ts │ │ ├── nodeLauncherBase.ts │ │ ├── nodeSourcePathResolver.ts │ │ ├── nodeTarget.ts │ │ ├── nodeWorkerTarget.ts │ │ ├── nvmResolver.ts │ │ ├── packageJsonProvider.ts │ │ ├── processLauncher.ts │ │ ├── program.ts │ │ ├── restartPolicy.ts │ │ ├── subprocessProgramLauncher.ts │ │ ├── terminalNodeLauncher.ts │ │ ├── terminalProgramLauncher.ts │ │ ├── terminateProcess.sh │ │ ├── watchdog.ts │ │ └── watchdogSpawn.ts │ ├── sourceMapOverrides.test.ts │ ├── sourceMapOverrides.ts │ ├── sourcePathResolver.ts │ ├── sourcePathResolverFactory.ts │ ├── targetOrigin.ts │ └── targets.ts ├── telemetry │ ├── classification.ts │ ├── dapTelemetryReporter.ts │ ├── experimentationService.ts │ ├── nullExperimentationService.ts │ ├── nullTelemetryReporter.ts │ ├── opsReportBatch.ts │ ├── performance.ts │ ├── telemetryReporter.ts │ ├── unhandledErrorReporter.ts │ └── vscodeExperimentationService.ts ├── test │ ├── asserts.ts │ ├── benchmark │ │ ├── formatMessage.ts │ │ ├── index.ts │ │ └── scriptSkipper.ts │ ├── breakpoints │ │ ├── breakpoints-break-on-load-in-js-file-without-sourcemap.txt │ │ ├── breakpoints-breakpoint-placement-end-function-stmt-babel.txt │ │ ├── breakpoints-breakpoint-placement-end-function-stmt-tsc.txt │ │ ├── breakpoints-breakpoint-placement-first-function-stmt-babel.txt │ │ ├── breakpoints-breakpoint-placement-first-function-stmt-tsc.txt │ │ ├── breakpoints-can-step-in-when-first-line-of-code-is-function.txt │ │ ├── breakpoints-condition-basic.txt │ │ ├── breakpoints-condition-ignores-bp-with-invalid-condition.txt │ │ ├── breakpoints-condition-ignores-error-by-default.txt │ │ ├── breakpoints-condition-invalid.txt │ │ ├── breakpoints-condition-pauses-on-error.txt │ │ ├── breakpoints-configure-absolute-paths-in-source-maps.txt │ │ ├── breakpoints-configure-inline.txt │ │ ├── breakpoints-configure-predictor-warns-on-inaccessible-directory-vscode100018.txt │ │ ├── breakpoints-configure-query-params.txt │ │ ├── breakpoints-configure-remove.txt │ │ ├── breakpoints-configure-script.txt │ │ ├── breakpoints-configure-source-map-predicted.txt │ │ ├── breakpoints-configure-source-map-thats-path-mapped.txt │ │ ├── breakpoints-configure-source-map.txt │ │ ├── breakpoints-custom-inner-html.txt │ │ ├── breakpoints-deals-with-removed-execution-contexts-1582.txt │ │ ├── breakpoints-disables-entrypoint-breakpoint-when-in-file-vscode230201.txt │ │ ├── breakpoints-does-not-interrupt-stepin-with-instrumentation-breakpoint-1665.txt │ │ ├── breakpoints-does-not-interrupt-stepover-with-instrumentation-breakpoint-1556.txt │ │ ├── breakpoints-excludes-callers.txt │ │ ├── breakpoints-first-line-breaks-if-requested.txt │ │ ├── breakpoints-first-line-does-not-break-if-not-requested.txt │ │ ├── breakpoints-gets-correct-line-number-with-babel-code-407.txt │ │ ├── breakpoints-handles-hot-transpiled-modules.txt │ │ ├── breakpoints-hit-condition-exact.txt │ │ ├── breakpoints-hit-condition-greater-than.txt │ │ ├── breakpoints-hit-condition-invalid.txt │ │ ├── breakpoints-hit-condition-less-than.txt │ │ ├── breakpoints-hit-count-can-change-after-set.txt │ │ ├── breakpoints-hit-count-can-change-breakpoint-after-being-set.txt │ │ ├── breakpoints-hit-count-does-not-validate-or-hit-invalid-breakpoint.txt │ │ ├── breakpoints-hit-count-implies-equal-1698.txt │ │ ├── breakpoints-hit-count-works-for-valid.txt │ │ ├── breakpoints-hot-transpiled-adjusts-breakpoints-after-already-running-524.txt │ │ ├── breakpoints-hot-transpiled-adjusts-breakpoints.txt │ │ ├── breakpoints-hot-transpiled-avoids-double-pathmapping-1617.txt │ │ ├── breakpoints-hot-transpiled-breaks-on-first-line.txt │ │ ├── breakpoints-hot-transpiled-does-not-adjust-already-correct.txt │ │ ├── breakpoints-hot-transpiled-user-defined-bp-on-first-line.txt │ │ ├── breakpoints-hot-transpiled-works-in-remote-workspaces.txt │ │ ├── breakpoints-ignores-source-url-query-string-1225.txt │ │ ├── breakpoints-launched-absolute-path-in-nested-module.txt │ │ ├── breakpoints-launched-inline.txt │ │ ├── breakpoints-launched-overwrite.txt │ │ ├── breakpoints-launched-ref.txt │ │ ├── breakpoints-launched-remove.txt │ │ ├── breakpoints-launched-script.txt │ │ ├── breakpoints-launched-sets-breakpoints-in-sourcemapped-nodemodules-with-absolute-root.txt │ │ ├── breakpoints-launched-sets-breakpoints-in-sourcemapped-nodemodules.txt │ │ ├── breakpoints-launched-source-map-remove.txt │ │ ├── breakpoints-launched-source-map-set-compiled-2.txt │ │ ├── breakpoints-launched-source-map-set-compiled.txt │ │ ├── breakpoints-launched-source-map.txt │ │ ├── breakpoints-lazy-async-stack-sets-eagerly-on-bp.txt │ │ ├── breakpoints-lazy-async-stack-sets-stack-on-pause.txt │ │ ├── breakpoints-logpoints-basic.txt │ │ ├── breakpoints-logpoints-callstack.txt │ │ ├── breakpoints-logpoints-no-double-log.txt │ │ ├── breakpoints-logpoints-returnvalue.txt │ │ ├── breakpoints-normalizes-webpack-nul-byte-1080.txt │ │ ├── breakpoints-prefers-file-uris-to-url-1598.txt │ │ ├── breakpoints-reevaluates-breakpoints-when-new-sources-come-in-600.txt │ │ ├── breakpoints-resolves-sourcemaps-in-paths-containing-glob-patterns-vscode166400.txt │ │ ├── breakpoints-restart-frame.txt │ │ ├── breakpoints-sets-file-uri-breakpoints-predictably-1748.txt │ │ ├── breakpoints-stepintargets.txt │ │ ├── breakpoints-stop-on-entry-on-ts-file-reports-as-entry.txt │ │ ├── breakpoints-toggles-source-map-stepping.txt │ │ ├── breakpoints-user-defined-bp-on-first-line-with-stop-on-entry-on-ts-file-reports-as-breakpoint.txt │ │ ├── breakpoints-vue-projects.txt │ │ └── breakpointsTest.ts │ ├── browser │ │ ├── blazorSourcePathResolverTest.ts │ │ ├── browser-args.test.ts │ │ ├── browser-launch-environment-variables.txt │ │ ├── browser-launch-runtime-args.txt │ │ ├── browser-launch.test.ts │ │ ├── frames-hierarchy.txt │ │ ├── framesTest.ts │ │ └── performance.test.ts │ ├── common │ │ ├── cancellation.test.ts │ │ ├── cdpTransport.test.ts │ │ ├── logging.test.ts │ │ ├── mapUsingProjection.test.ts │ │ ├── pathUtils.test.ts │ │ ├── sourceMapOverrides.test.ts │ │ └── sourceMapRepository.test.ts │ ├── completion │ │ └── completion.test.ts │ ├── console │ │ ├── console-api-format-format-string.txt │ │ ├── console-api-format-string.txt │ │ ├── console-format-adds-error-traces-if-they-do-not-exist.txt │ │ ├── console-format-ansi-colorization.txt │ │ ├── console-format-applies-skipfiles-to-logged-stacks.txt │ │ ├── console-format-array.txt │ │ ├── console-format-class.txt │ │ ├── console-format-collections.txt │ │ ├── console-format-colors.txt │ │ ├── console-format-custom-symbol.txt │ │ ├── console-format-custom-tostring.txt │ │ ├── console-format-error-traces-in-source-maps.txt │ │ ├── console-format-es6-2.txt │ │ ├── console-format-es6.txt │ │ ├── console-format-ext-handling.txt │ │ ├── console-format-groups.txt │ │ ├── console-format-nodes.txt │ │ ├── console-format-popular-types.txt │ │ ├── console-format-string-format.txt │ │ ├── console-format-string.txt │ │ ├── consoleAPITest.ts │ │ └── consoleFormatTest.ts │ ├── createFileTree.ts │ ├── evaluate │ │ ├── evaluate-cd.txt │ │ ├── evaluate-copy-via-evaluate-context.txt │ │ ├── evaluate-copy-via-function.txt │ │ ├── evaluate-default.txt │ │ ├── evaluate-inspect.txt │ │ ├── evaluate-output-slots-2.txt │ │ ├── evaluate-output-slots.txt │ │ ├── evaluate-queryobjects.txt │ │ ├── evaluate-repl.txt │ │ ├── evaluate-returnvalue.txt │ │ ├── evaluate-rewritetoplevelawait.txt │ │ ├── evaluate-selected-context.txt │ │ ├── evaluate-shadowed-variables.txt │ │ ├── evaluate-supports-bigint-map-keys-1277.txt │ │ ├── evaluate-supports-location-lookup.txt │ │ ├── evaluate-toplevelawait.txt │ │ ├── evaluate-valueformatter.txt │ │ └── evaluate.ts │ ├── extension │ │ ├── extensionHostConfigurationProvider.test.ts │ │ ├── nodeConfigurationProvider.test.ts │ │ ├── pickAttach.test.ts │ │ ├── profiling-cpu-profiling-breakpoints-continues-if-was-paused-on-start-with-debugger-domain.txt │ │ ├── profiling-cpu-profiling-breakpoints-continues-if-was-paused-on-start.txt │ │ ├── profiling-cpu-profiling-breakpoints-does-not-unverify-target-breakpoint.txt │ │ ├── profiling-cpu-profiling-breakpoints-runs-until-a-breakpoint-is-hit.txt │ │ ├── profiling-cpu-profiling-breakpoints-unverifies-and-reverifies.txt │ │ ├── profiling-heap-profiling-breakpoints-continues-if-was-paused-on-start-with-debugger-domain.txt │ │ ├── profiling-heap-profiling-breakpoints-continues-if-was-paused-on-start.txt │ │ ├── profiling-heap-profiling-breakpoints-does-not-unverify-target-breakpoint.txt │ │ ├── profiling-heap-profiling-breakpoints-runs-until-a-breakpoint-is-hit.txt │ │ ├── profiling-heap-profiling-breakpoints-unverifies-and-reverifies.txt │ │ └── profiling.test.ts │ ├── framework │ │ ├── react-hit-breakpoint.txt │ │ ├── react-js-hit-breakpoint.txt │ │ └── reactTest.ts │ ├── goldenText.ts │ ├── infra │ │ ├── infra-initialize.txt │ │ └── infra.ts │ ├── logger.ts │ ├── node │ │ ├── lease-file.test.ts │ │ ├── node-runtime-adjusts-to-compiles-file-if-it-exists.txt │ │ ├── node-runtime-attaching-attaches-children-of-child-processes.txt │ │ ├── node-runtime-attaching-attaches-to-cluster-processes.txt │ │ ├── node-runtime-attaching-attaches-to-existing-processes.txt │ │ ├── node-runtime-attaching-restarts-if-requested.txt │ │ ├── node-runtime-attaching-retries-attachment.txt │ │ ├── node-runtime-chakracore-string-value.txt │ │ ├── node-runtime-child-processes-debugs.txt │ │ ├── node-runtime-debugs-child-processes.txt │ │ ├── node-runtime-debugs-worker-threads.txt │ │ ├── node-runtime-inspect-flag-handling-does-not-break-with-inspect-flag.txt │ │ ├── node-runtime-inspect-flag-handling-treats-inspect-brk-as-stoponentry.txt │ │ ├── node-runtime-reads-the-envfile.txt │ │ ├── node-runtime-scripts-with-http-urls.txt │ │ ├── node-runtime-sets-arguments.txt │ │ ├── node-runtime-sets-environment-variables.txt │ │ ├── node-runtime-sets-sourcemapoverrides-from-the-cwd.txt │ │ ├── node-runtime-sets-the-cwd.txt │ │ ├── node-runtime-simple-script.txt │ │ ├── node-runtime-simpleportattach-allows-inspect-brk-in-npm-scripts.txt │ │ ├── node-runtime-simpleportattach-allows-simple-port-attachment.txt │ │ ├── node-runtime-simpleportattach-terminates-when-inspector-closed.txt │ │ ├── node-runtime-simpleportattach-terminates-when-process-killed.txt │ │ ├── node-runtime-skipfiles-with-delay-caught.txt │ │ ├── node-runtime-skipfiles-with-delay-caughtinusercode.txt │ │ ├── node-runtime-skipfiles-with-delay-rethrown.txt │ │ ├── node-runtime-skipfiles-with-delay-uncaught.txt │ │ ├── node-runtime-skipfiles-without-delay-caught.txt │ │ ├── node-runtime-skipfiles-without-delay-caughtinusercode.txt │ │ ├── node-runtime-skipfiles-without-delay-rethrown.txt │ │ ├── node-runtime-skipfiles-without-delay-uncaught.txt │ │ ├── node-runtime-stoponentry-launches-and-infers-entry-from-args.txt │ │ ├── node-runtime-stoponentry-sets-an-explicit-stop-on-entry-point.txt │ │ ├── node-runtime-stoponentry-stops-with-a-breakpoint-elsewhere-515.txt │ │ ├── node-runtime-stoponentry-stops-with-a-program-provided.txt │ │ ├── node-runtime.test.ts │ │ ├── node-source-path-resolver.test.ts │ │ ├── process-tree.test.ts │ │ └── runtimeVersion.test.ts │ ├── reporters │ │ ├── goldenTextReporter.ts │ │ ├── goldenTextReporterUtils.ts │ │ ├── logReporterUtils.ts │ │ └── logTestReporter.ts │ ├── resourceProvider │ │ ├── resourceProvider.test.ts │ │ ├── resourceprovider-applies-cookies.txt │ │ └── resourceprovider-follows-redirects.txt │ ├── runTest.js │ ├── sources │ │ ├── pretty-print-sources-base.txt │ │ ├── pretty-print-sources-bps.txt │ │ ├── pretty-print-sources-eval-sources-929.txt │ │ ├── pretty-print-sources-steps-in-pretty.txt │ │ ├── pretty-print.test.ts │ │ ├── sources-allows-overrides-for-relative-webpack-paths-479.txt │ │ ├── sources-allows-shebang-in-node-code.txt │ │ ├── sources-applies-sourcemap-path-mappings-to-sourceurls-vscode204784.txt │ │ ├── sources-basic-source-map.txt │ │ ├── sources-basic-sources.txt │ │ ├── sources-lazily-announces-eval.txt │ │ ├── sources-removes-any-query-from-node-paths-529.txt │ │ ├── sources-sourcemap-error-handling-logs-initial-parse-errors.txt │ │ ├── sources-sourcemap-error-handling-logs-not-found-errors.txt │ │ ├── sources-supports-nested-sourcemaps-1390.txt │ │ ├── sources-updated-content.txt │ │ ├── sources-url-and-hash.txt │ │ ├── sources-waiting-for-source-map-failure.txt │ │ ├── sources-waiting-for-source-map.txt │ │ ├── sources-works-with-relative-webpack-sourcemaps-479.txt │ │ └── sourcesTest.ts │ ├── stacks │ │ ├── stacks-anonymous-initial-script.txt │ │ ├── stacks-anonymous-scopes.txt │ │ ├── stacks-async-disables.txt │ │ ├── stacks-async.txt │ │ ├── stacks-cross-target.txt │ │ ├── stacks-eval-in-anonymous.txt │ │ ├── stacks-return-value.txt │ │ ├── stacks-skipfiles-handles-special-chars-in-stack-203408.txt │ │ ├── stacks-skipfiles-multiple-authored-ts-to-js.txt │ │ ├── stacks-skipfiles-single-authored-js.txt │ │ ├── stacks-skipfiles-single-compiled-js.txt │ │ ├── stacks-skipfiles-toggle-authored-ts.txt │ │ ├── stacks-skipfiles-works-with-absolute-paths-470.txt │ │ ├── stacks-smartstep-does-not-smart-step-manual-breakpoints.txt │ │ ├── stacks-smartstep-does-not-smart-step-on-exception-breakpoints.txt │ │ ├── stacks-smartstep-does-not-step-in-sources-missing-maps.txt │ │ ├── stacks-smartstep-remembers-step-direction-in.txt │ │ ├── stacks-smartstep-remembers-step-direction-out.txt │ │ ├── stacks-smartstep-simple-stepping.txt │ │ ├── stacks-smartstep.txt │ │ ├── stacks-source-map.txt │ │ ├── stacks-uses-custom-descriptions-in-frame-names.txt │ │ └── stacksTest.ts │ ├── test.ts │ ├── testHooks.ts │ ├── testIntegrationUtils.ts │ ├── testMemento.ts │ ├── testRunner.ts │ ├── testServer.js │ ├── threads │ │ ├── threads-not-paused.txt │ │ ├── threads-pause-on-exceptions-cases.txt │ │ ├── threads-pause-on-exceptions-configuration.txt │ │ ├── threads-pause-on-exceptions-deals-with-syntax-errors-in-conditional-exception-bps.txt │ │ ├── threads-pause-on-exceptions-does-not-pause-on-exceptions-in-internals.txt │ │ ├── threads-pause-on-exceptions-pauses-on-conditional-exceptions.txt │ │ ├── threads-paused.txt │ │ ├── threads-stepping-basic.txt │ │ ├── threads-stepping-cross-thread-constructor-source-map-predicted.txt │ │ ├── threads-stepping-cross-thread-constructor-source-map.txt │ │ ├── threads-stepping-cross-thread-constructor.txt │ │ ├── threads-stepping-cross-thread-skip-over-tasks.txt │ │ ├── threads-stepping-cross-thread-source-map.txt │ │ ├── threads-stepping-cross-thread.txt │ │ ├── threadsTest-startup-tests-events.txt │ │ └── threadsTest.ts │ ├── variables │ │ ├── variables-basic-basic-object.txt │ │ ├── variables-basic-clear-console.txt │ │ ├── variables-basic-simple-log.txt │ │ ├── variables-map-variable-without-preview-1824.txt │ │ ├── variables-multiple-threads-worker.txt │ │ ├── variables-object-customdescriptiongenerator-shows-errors.txt │ │ ├── variables-object-customdescriptiongenerator-using-function-declaration.txt │ │ ├── variables-object-customdescriptiongenerator-using-statement-syntax.txt │ │ ├── variables-object-customdescriptiongenerator-using-statement-with-return-syntax.txt │ │ ├── variables-object-customdescriptiongenerator-with-arrays.txt │ │ ├── variables-object-custompropertiesgenerator-works-with-custompropertiesgenerator-method.txt │ │ ├── variables-object-deep-accessor.txt │ │ ├── variables-object-get-set.txt │ │ ├── variables-object-private-props.txt │ │ ├── variables-object-shows-errors-while-generating-properties.txt │ │ ├── variables-object-simple-array.txt │ │ ├── variables-readmemorywritememory.txt │ │ ├── variables-setvariable-basic.txt │ │ ├── variables-setvariable-evaluatename.txt │ │ ├── variables-setvariable-name-mapping.txt │ │ ├── variables-setvariable-scope.txt │ │ ├── variables-setvariable-setexpression.txt │ │ ├── variables-web-tags.txt │ │ └── variablesTest.ts │ ├── wasm │ │ ├── wasm.test.ts │ │ ├── webassembly-basic-stepping-and-breakpoints.txt │ │ ├── webassembly-dwarf-basic-stepping.txt │ │ ├── webassembly-dwarf-can-break-immediately.txt │ │ ├── webassembly-dwarf-does-lldb-evaluation-for-structs.txt │ │ ├── webassembly-dwarf-does-lldb-evaluation.txt │ │ ├── webassembly-dwarf-inline-breakpoints-set-at-all-call-sites.txt │ │ ├── webassembly-dwarf-inline-function-stepping-1.txt │ │ ├── webassembly-dwarf-inline-function-stepping-2.txt │ │ └── webassembly-dwarf-scopes-and-variables.txt │ └── webview │ │ ├── webview-breakpoints-launched-script.txt │ │ └── webview.breakpoints.test.win.ts ├── typings │ ├── acorn-loose.d.ts │ ├── acorn-walk.d.ts │ ├── astring.d.ts │ ├── json.d.ts │ ├── object.d.ts │ ├── typedArrays.d.ts │ ├── vscode-js-debug.d.ts │ ├── vscode.d.ts │ ├── vscode.proposed.portsAttributes.d.ts │ ├── vscode.proposed.tunnels.d.ts │ └── vscode.proposed.workspaceTrust.d.ts ├── ui │ ├── autoAttach.ts │ ├── basic-wat.configuration.json │ ├── basic-wat.tmLanguage.json │ ├── cascadeTerminateTracker.ts │ ├── companionBrowserLaunch.ts │ ├── configuration │ │ ├── baseConfigurationProvider.ts │ │ ├── baseConfigurationResolver.ts │ │ ├── chromeDebugConfigurationProvider.ts │ │ ├── chromiumDebugConfigurationProvider.ts │ │ ├── configurationProvider.ts │ │ ├── edgeDebugConfigurationProvider.ts │ │ ├── extensionHostConfigurationResolver.ts │ │ ├── index.ts │ │ ├── nodeDebugConfigurationProvider.ts │ │ ├── nodeDebugConfigurationResolver.ts │ │ └── terminalDebugConfigurationResolver.ts │ ├── configurationUtils.ts │ ├── customBreakpointsUI.ts │ ├── debugLinkUI.ts │ ├── debugNpmScript.ts │ ├── debugSessionTracker.ts │ ├── debugSessionTunnels.ts │ ├── debugTerminalUI.ts │ ├── diagnosticsUI.ts │ ├── disableSourceMapUI.ts │ ├── dwarfModuleProviderImpl.ts │ ├── edgeDevToolOpener.ts │ ├── excludedCallersUI.ts │ ├── extensionApi.ts │ ├── getRunScriptCommand.ts │ ├── launchJsonCompletions.ts │ ├── launchJsonUpdateHelper.ts │ ├── linkedBreakpointLocation.ts │ ├── linkedBreakpointLocationUI.ts │ ├── longPredictionUI.ts │ ├── managedContextKey.ts │ ├── managedState.ts │ ├── networkTree.ts │ ├── portAttributesProvider.ts │ ├── prettyPrint.ts │ ├── processPicker.ts │ ├── processTree │ │ ├── baseProcessTree.ts │ │ ├── darwinProcessTree.ts │ │ ├── posixProcessTree.ts │ │ ├── processTree.test.ts │ │ ├── processTree.ts │ │ └── windowsProcessTree.ts │ ├── profiling.ts │ ├── profiling │ │ ├── breakpointTerminationCondition.ts │ │ ├── durationTerminationCondition.ts │ │ ├── manualTerminationCondition.ts │ │ ├── terminationCondition.ts │ │ ├── uiProfileManager.ts │ │ └── uiProfileSession.ts │ ├── requestCDPProxy.ts │ ├── revealPage.ts │ ├── settingRequestOptionsProvider.ts │ ├── shutdownParticipants.ts │ ├── sourceSteppingUI.ts │ ├── startDebuggingAndStopOnEntry.ts │ ├── terminalLinkHandler.ts │ ├── toggleSkippingFile.ts │ ├── ui-ioc.extensionOnly.ts │ ├── ui-ioc.ts │ └── vsCodeSessionManager.ts └── vsDebugServer.ts ├── testWorkspace ├── .vscode │ └── settings.json ├── babelLineNumbers │ ├── app.tsx │ ├── columns-test.txt │ ├── compiled.js │ ├── compiled.js.map │ └── index.tsx ├── chakracore │ ├── ChakraCore.Debugger.Sample.exe │ ├── ChakraCore.Debugger.dll │ └── ChakraCore.dll ├── customDebuggerDescriptions │ ├── .vscode │ │ └── launch.json │ ├── app.js │ ├── app.js.map │ ├── app.ts │ └── tsconfig.json ├── glob(chars) │ ├── app.js │ ├── app.js.map │ └── app.ts ├── hashTestCases │ ├── blns.js │ ├── index.html │ ├── simple.js │ ├── utf16be.js │ ├── utf16le.js │ └── utf8-bom.js ├── moduleWrapper │ ├── customWrapper.js │ ├── index.js │ └── test.js ├── nestedAbsRoot │ ├── index.js │ └── test.js ├── nestedSourceMaps │ ├── .gitignore │ ├── a │ │ ├── main.bundle.js │ │ ├── main.js │ │ └── webpack.config.js │ ├── b │ │ ├── lib.bundle.js │ │ ├── lib.js │ │ └── webpack.config.js │ └── package.json ├── nodeModuleBreakpoint │ ├── index.js │ └── node_modules │ │ ├── .DS_Store │ │ └── @c4312 │ │ ├── absolute-sourceroot │ │ ├── out │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── package.json │ │ └── src │ │ │ └── index.ts │ │ └── foo │ │ ├── out │ │ ├── index.js │ │ └── index.js.map │ │ ├── package.json │ │ └── src │ │ └── index.ts ├── nodePathProvider │ ├── Makefile │ ├── no-node │ │ ├── babel.cmd │ │ ├── npm │ │ └── npm.exe │ ├── node-module │ │ ├── node_modules │ │ │ └── .bin │ │ │ │ ├── node │ │ │ │ └── node.exe │ │ └── package.json │ ├── outdated │ │ ├── node │ │ ├── node.exe │ │ ├── npm │ │ └── npm.exe │ ├── program.go │ └── up-to-date │ │ ├── node │ │ ├── node.exe │ │ ├── npm │ │ └── npm.exe ├── node_modules │ └── browser-pack │ │ └── _prelude.js ├── simpleNode │ ├── debuggerStmt.js │ ├── index.js │ ├── logNodeOptions.js │ ├── package-lock.json │ ├── package.json │ ├── profilePlayground.js │ ├── simpleWebpack.js │ ├── simpleWebpack.js.map │ ├── simpleWebpack.ts │ ├── simpleWebpackWithQuery.js │ ├── simpleWebpackWithQuery.js.map │ ├── simpleWebpackWithQuery.ts │ ├── skipFiles.js │ └── skippedScript.js ├── sourceMapLocations │ ├── babel.js │ ├── babel.js.map │ ├── tsc.js │ └── tsc.js.map ├── sourceQueryString │ ├── input.ts │ └── output.js ├── tsNode │ ├── double.ts │ ├── index.js │ ├── log.ts │ ├── matching-line.ts │ └── withAbsRoot.js ├── tsNodeApp │ ├── .vscode │ │ └── launch.json │ ├── app.js │ ├── app.js.map │ ├── app.ts │ └── tsconfig.json ├── web │ ├── addWorker.js │ ├── asyncStack.html │ ├── asyncStack.js │ ├── basic.html │ ├── basic.js │ ├── basic.js.map │ ├── basic.ts │ ├── browserify │ │ ├── browserify.html │ │ ├── bundle.js │ │ ├── bundle.js.map │ │ ├── index.ts │ │ ├── module1.ts │ │ ├── module2.ts │ │ ├── pause.html │ │ ├── pause.js │ │ ├── pause.js.map │ │ └── pause.ts │ ├── child.html │ ├── condition.html │ ├── condition.js │ ├── dir │ │ └── helloworld.js │ ├── dwarf │ │ ├── c-with-struct.c │ │ ├── c-with-struct.html │ │ ├── c-with-struct.wasm │ │ ├── diverse-inlining-extern.c │ │ ├── diverse-inlining-main.c │ │ ├── diverse-inlining.h │ │ ├── diverse-inlining.html │ │ ├── diverse-inlining.js │ │ ├── diverse-inlining.wasm │ │ ├── fibonacci.c │ │ ├── fibonacci.html │ │ ├── fibonacci.js │ │ ├── fibonacci.wasm │ │ └── readme.md │ ├── empty.js │ ├── empty2.js │ ├── frames.html │ ├── grandchild.html │ ├── hello.js │ ├── iframe-1582 │ │ ├── index.html │ │ ├── inner.html │ │ └── inner.js │ ├── index.html │ ├── inlinescript.html │ ├── inlinescriptpause.html │ ├── logging.html │ ├── logging.js │ ├── minified │ │ ├── .gitignore │ │ ├── index.html │ │ ├── index.js │ │ ├── index.min.js │ │ ├── index.min.js.map │ │ └── package.json │ ├── pathMapped │ │ ├── app.js │ │ ├── app.js.map │ │ ├── app.ts │ │ └── index.html │ ├── pretty │ │ ├── pretty.html │ │ └── ugly.js │ ├── restart.html │ ├── restart.js │ ├── script-with-query-param.html │ ├── script.html │ ├── script.js │ ├── smartStep │ │ ├── async.js │ │ ├── async.js.map │ │ ├── async.ts │ │ ├── directional.js │ │ ├── directional.js.map │ │ ├── exceptionBp.js │ │ ├── exceptionBp.js.map │ │ ├── missingMap.js │ │ └── tsconfig.json │ ├── stepInTargets.html │ ├── stepInTargets.js │ ├── stringFormats.html │ ├── urlSourcemap │ │ ├── index.js │ │ ├── index.js.map │ │ └── index.ts │ ├── vscode-204784 │ │ ├── .gitignore │ │ ├── dist │ │ │ └── index.js │ │ ├── index.html │ │ └── src │ │ │ └── original.js │ ├── vue │ │ ├── favicon.ico │ │ ├── img │ │ │ └── logo.82b9c7a5.png │ │ ├── index.html │ │ └── js │ │ │ ├── app.js │ │ │ ├── app.js.map │ │ │ ├── chunk-vendors.js │ │ │ └── chunk-vendors.js.map │ ├── wasm │ │ ├── hello.html │ │ └── hello.wasm │ ├── webpack │ │ ├── relative-paths.bundle.js │ │ ├── relative-paths.bundle.js.map │ │ ├── relative-paths.html │ │ └── relative-paths.js │ ├── worker.html │ ├── worker.js │ ├── workerSourceMap.js │ ├── workerSourceMap.js.map │ └── workerSourceMap.ts ├── webpackNulByte │ ├── build │ │ ├── greeter.js │ │ └── greeter.js.map │ └── src │ │ └── #hello │ │ └── world.ts └── webview │ └── win │ ├── .gitignore │ ├── WebView2Loader.dll │ ├── WebView2Sample.exe │ ├── WebView2Sample.iobj │ ├── WebView2Sample.ipdb │ └── WebView2Sample.pdb └── tsconfig.json /.ci/pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | branches: 3 | include: ['*'] 4 | 5 | jobs: 6 | - job: macOS 7 | timeoutInMinutes: 20 8 | pool: 9 | vmImage: 'macos-latest' 10 | steps: 11 | - template: common-validation.yml 12 | variables: 13 | node_version: 16.14.2 14 | 15 | - job: Linux 16 | pool: 17 | vmImage: 'ubuntu-latest' 18 | steps: 19 | - template: common-validation.yml 20 | variables: 21 | node_version: 16.14.2 22 | 23 | - job: LinuxMinspec 24 | pool: 25 | vmImage: 'ubuntu-latest' 26 | steps: 27 | - template: common-validation.yml 28 | variables: 29 | node_version: 16.14.2 30 | only_minspec: true 31 | 32 | - job: Windows 33 | pool: 34 | vmImage: windows-latest 35 | steps: 36 | - template: common-validation.yml 37 | variables: 38 | node_version: 16.14.2 39 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | *.txt eol=lf 3 | *.ts eol=lf 4 | *.tsx eol=lf 5 | *.json eol=lf 6 | *.js eol=lf 7 | *.md eol=lf 8 | 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature-request 6 | assignees: connor4312 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the feature you'd like** 13 | A clear and concise description of what you want to happen. 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: Something else 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .cache/ 2 | .profile/ 3 | .cdp-profile/ 4 | .headless-profile/ 5 | .vscode-test/ 6 | .DS_Store 7 | node_modules/ 8 | out/ 9 | dist 10 | /coverage 11 | /.nyc_output 12 | demos/web-worker/vscode-pwa-dap.log 13 | demos/web-worker/vscode-pwa-cdp.log 14 | .dynamic-testWorkspace 15 | **/test/**/*.actual 16 | /testWorkspace/web/tmp 17 | /testWorkspace/**/debug.log 18 | /testWorkspace/webview/win/true/ 19 | *.cpuprofile 20 | *.heapsnapshot 21 | *.heapprofile 22 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run -S precommit 5 | -------------------------------------------------------------------------------- /.mocharc.unit.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: ['source-map-support/register', './src/test/testHooks.ts'], 3 | spec: 'src/**/*.test.ts', 4 | ignore: ['src/test/**/*.ts'], 5 | }; 6 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "npm", 6 | "script": "watch", 7 | "problemMatcher": { 8 | "base": "$gulp-tsc", 9 | "applyTo": "closedDocuments", 10 | "background": { 11 | "beginsPattern": "Starting", 12 | "endsPattern": "Finished" 13 | } 14 | }, 15 | "isBackground": true, 16 | // https://github.com/microsoft/vscode/issues/83016 17 | // "presentation": { 18 | // "reveal": "never" 19 | // }, 20 | "group": { 21 | "kind": "build", 22 | "isDefault": true 23 | } 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | # note: this is moved into `dist` during compilation, and does not actually apply here 2 | **/*.map 3 | src/build/** 4 | src/testRunner.js 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /CodeQL.yml: -------------------------------------------------------------------------------- 1 | path_classifiers: 2 | test: 3 | - "**/*.test.ts" 4 | - "src/test/**/*.ts" 5 | - .vscode-test 6 | 7 | generated: 8 | - testWorkspace 9 | - dist 10 | 11 | library: 12 | - "**/node_modules/**" 13 | -------------------------------------------------------------------------------- /README.nightly.md: -------------------------------------------------------------------------------- 1 | > **This is a nightly version of this extension for early feedback and testing. This extension works best with [VS Code Insiders](https://code.visualstudio.com/insiders)** 2 | -------------------------------------------------------------------------------- /dprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://dprint.dev/schemas/v0.json", 3 | "lineWidth": 100, 4 | "indentWidth": 2, 5 | "newLineKind": "lf", 6 | "typescript": { 7 | "useTabs": false, 8 | "quoteStyle": "preferSingle", 9 | "trailingCommas": "onlyMultiLine", 10 | "arrowFunction.useParentheses": "preferNone" 11 | }, 12 | "excludes": [ 13 | "**/node_modules", 14 | "**/testWorkspace", 15 | "**/*-lock.json", 16 | "**/*.d.ts", 17 | "!src/{dap,cdp}/*.d.ts" 18 | ], 19 | "plugins": [ 20 | "https://plugins.dprint.dev/typescript-0.91.6.wasm", 21 | "https://plugins.dprint.dev/json-0.19.3.wasm", 22 | "https://plugins.dprint.dev/markdown-0.17.8.wasm" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /resources/dark/node.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/open-file.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/dark/pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/dark/restart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/dark/resume.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /resources/dark/stop-profiling.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /resources/dark/stop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /resources/light/node.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/open-file.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/light/pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /resources/light/restart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/light/resume.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /resources/light/stop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/logo.png -------------------------------------------------------------------------------- /resources/readme/auto-attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/auto-attach.png -------------------------------------------------------------------------------- /resources/readme/conditional-exception-breakpoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/conditional-exception-breakpoints.png -------------------------------------------------------------------------------- /resources/readme/exclude-caller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/exclude-caller.png -------------------------------------------------------------------------------- /resources/readme/flame-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/flame-chart.png -------------------------------------------------------------------------------- /resources/readme/instrumentation-breakpoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/instrumentation-breakpoints.png -------------------------------------------------------------------------------- /resources/readme/instrumentation-breakpoints2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/instrumentation-breakpoints2.png -------------------------------------------------------------------------------- /resources/readme/logo-with-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/logo-with-text.png -------------------------------------------------------------------------------- /resources/readme/network-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/network-view.png -------------------------------------------------------------------------------- /resources/readme/pretty-print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/pretty-print.png -------------------------------------------------------------------------------- /resources/readme/returnvalue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/returnvalue.png -------------------------------------------------------------------------------- /resources/readme/top-level-await.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/top-level-await.png -------------------------------------------------------------------------------- /resources/readme/wasm-dwarf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/wasm-dwarf.png -------------------------------------------------------------------------------- /resources/readme/web-worker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/web-worker.png -------------------------------------------------------------------------------- /resources/readme/webview2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/resources/readme/webview2.png -------------------------------------------------------------------------------- /src/adapter/breakpoints/conditions/runtimeLogPoint.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import Cdp from '../../../cdp/api'; 6 | import { PreparedCallFrameExpr } from '../../evaluator'; 7 | import { IBreakpointCondition } from '.'; 8 | 9 | /** 10 | * A logpoint that requires being paused and running a custom expression to 11 | * log correctly. 12 | */ 13 | export class RuntimeLogPoint implements IBreakpointCondition { 14 | public readonly breakCondition = undefined; 15 | 16 | constructor(private readonly invoke: PreparedCallFrameExpr) {} 17 | 18 | public async shouldStayPaused(details: Cdp.Debugger.PausedEvent) { 19 | await this.invoke({ callFrameId: details.callFrames[0].callFrameId }); 20 | return false; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/adapter/cdpProxy.pdl: -------------------------------------------------------------------------------- 1 | version 2 | major 1 3 | minor 0 4 | 5 | experimental domain JsDebug 6 | # Subscribes to the given CDP event(s). Events will not be sent through the 7 | # connection unless you subscribe to them 8 | command subscribe 9 | parameters 10 | # List of events to subscribe to. Supports wildcards, for example 11 | # you can subscribe to `Debugger.scriptParsed` or `Debugger.*` 12 | array of string events 13 | -------------------------------------------------------------------------------- /src/adapter/clientCapabilities.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { injectable } from 'inversify'; 6 | import Dap from '../dap/api'; 7 | 8 | export interface IClientCapabilies { 9 | value?: Dap.InitializeParams; 10 | } 11 | 12 | export const IClientCapabilies = Symbol('IClientCapabilies'); 13 | 14 | @injectable() 15 | export class ClientCapabilities implements IClientCapabilies { 16 | value?: Dap.InitializeParams | undefined; 17 | } 18 | -------------------------------------------------------------------------------- /src/adapter/dwarf/dwarfModuleProvider.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export const IDwarfModuleProvider = Symbol('IDwarfModuleProvider'); 6 | 7 | export interface IDwarfModuleProvider { 8 | /** 9 | * Loads the dwarf module if it exists. 10 | */ 11 | load(): Promise; 12 | 13 | /** 14 | * Prompts the user to install the dwarf module (called if the module is 15 | * not installed.) 16 | */ 17 | prompt(): void; 18 | } 19 | -------------------------------------------------------------------------------- /src/adapter/resourceProvider/httpError.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | -------------------------------------------------------------------------------- /src/adapter/resourceProvider/requestOptionsProvider.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { OptionsOfTextResponseBody } from 'got'; 6 | 7 | export interface IRequestOptionsProvider { 8 | /** 9 | * Called before requests are made, can be used to add 10 | * extra options into the request. 11 | */ 12 | provideOptions(obj: OptionsOfTextResponseBody, url: string): void; 13 | } 14 | 15 | export const IRequestOptionsProvider = Symbol('IRequestOptionsProvider'); 16 | -------------------------------------------------------------------------------- /src/adapter/scriptSkipper/scriptSkipper.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export const IScriptSkipper = Symbol('IScriptSkipper'); 6 | 7 | export interface IScriptSkipper { 8 | isScriptSkipped(url: string): boolean; 9 | } 10 | -------------------------------------------------------------------------------- /src/adapter/templates/getArraySlots.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { remoteFunction } from '.'; 6 | 7 | /** 8 | * Returns an object containing array property descriptors for the given 9 | * range of array indices. 10 | */ 11 | export const getArraySlots = remoteFunction(function( 12 | this: unknown[], 13 | start: number, 14 | count: number, 15 | ) { 16 | const result = {}; 17 | const from = start === -1 ? 0 : start; 18 | const to = count === -1 ? this.length : start + count; 19 | for (let i = from; i < to && i < this.length; ++i) { 20 | const descriptor = Object.getOwnPropertyDescriptor(this, i); 21 | if (descriptor) { 22 | Object.defineProperty(result, i, descriptor); 23 | } 24 | } 25 | 26 | return result; 27 | }); 28 | -------------------------------------------------------------------------------- /src/adapter/templates/invokeGetter.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { remoteFunction } from '.'; 6 | 7 | /** 8 | * Gets the object property. 9 | */ 10 | export const invokeGetter = remoteFunction(function( 11 | this: unknown, 12 | getterFn: (this: unknown) => unknown, 13 | ) { 14 | return getterFn.call(this); 15 | }); 16 | -------------------------------------------------------------------------------- /src/adapter/templates/previewThis.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { remoteFunction } from '.'; 6 | 7 | /** 8 | * Returns a preview of the current context. 9 | */ 10 | export const previewThis = remoteFunction(function(this: unknown) { 11 | return this; 12 | }); 13 | -------------------------------------------------------------------------------- /src/build/.gitignore: -------------------------------------------------------------------------------- 1 | /__pycache__ 2 | /pdl.py 3 | -------------------------------------------------------------------------------- /src/build/archiveDapBundle.js: -------------------------------------------------------------------------------- 1 | const cp = require('child_process'); 2 | const path = require('path'); 3 | const packageJson = require('../../package.json'); 4 | const targetDirectory = process.argv[2]; 5 | 6 | require('fs').mkdirSync(targetDirectory, { recursive: true }); 7 | 8 | cp.spawnSync( 9 | 'tar', 10 | [ 11 | '-czvf', 12 | `${targetDirectory}/js-debug-dap-v${packageJson.version}.tar.gz`, 13 | 'dist', 14 | '--transform', 15 | 's/^dist/js-debug/', 16 | ], 17 | { 18 | stdio: 'inherit', 19 | cwd: path.resolve(__dirname, '../..'), 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/cdp/protocol.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export namespace CdpProtocol { 6 | export interface ICommand { 7 | id?: number; 8 | method: string; 9 | params: object; 10 | sessionId?: string; 11 | } 12 | 13 | export interface IError { 14 | id: number; 15 | method?: string; 16 | error: { code: number; message: string }; 17 | sessionId?: string; 18 | } 19 | 20 | export interface ISuccess { 21 | id: number; 22 | result: object; 23 | sessionId?: string; 24 | } 25 | 26 | export type Message = ICommand | ISuccess | IError; 27 | } 28 | -------------------------------------------------------------------------------- /src/cdp/transport.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { Event } from 'vscode'; 6 | import { IDisposable } from '../common/disposable'; 7 | import { HrTime } from '../common/hrnow'; 8 | 9 | export interface ITransport extends IDisposable { 10 | readonly onMessage: Event<[/* contents */ string, /* receivedTime */ HrTime]>; 11 | readonly onEnd: Event; 12 | 13 | /** 14 | * Sends a serialized message over the transport. 15 | */ 16 | send(message: string): void; 17 | } 18 | -------------------------------------------------------------------------------- /src/common/console.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as vscode from 'vscode'; 6 | 7 | /** 8 | * Send to debug console. 9 | */ 10 | export function writeToConsole(message: string) { 11 | vscode.debug.activeDebugConsole.appendLine(message); 12 | } 13 | -------------------------------------------------------------------------------- /src/common/findOpenPortSync.test.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { expect } from 'chai'; 6 | import { findOpenPortSync } from './findOpenPortSync'; 7 | 8 | describe('findOpenPortSync', () => { 9 | it('works', async function() { 10 | this.timeout(10_000); 11 | expect(findOpenPortSync({ attempts: 5 })).to.be.greaterThan(0); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /src/common/int32Counter.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | -------------------------------------------------------------------------------- /src/common/knownTools.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | /** 6 | * Globs for tools we can auto attach to. 7 | */ 8 | const knownTools: ReadonlySet = new Set([ 9 | // #region test runners 10 | 'mocha', 11 | 'jest', 12 | 'jest-cli', 13 | 'ava', 14 | 'tape', 15 | 'tap', 16 | // #endregion, 17 | 18 | // #region transpilers 19 | 'ts-node', 20 | 'babel-node', 21 | // #endregion, 22 | ]); 23 | export const knownToolToken = '$KNOWN_TOOLS$'; 24 | 25 | export const knownToolGlob = `{${[...knownTools].join(',')}}`; 26 | -------------------------------------------------------------------------------- /src/common/l10n.extensionOnly.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as vscode from 'vscode'; 6 | 7 | /** 8 | * This file is only included in the extension build, to pull localization from 9 | * the vscode API. Otherwise, the l10n.t(s file is used. 10 | */ 11 | export const t = vscode.l10n.t; 12 | -------------------------------------------------------------------------------- /src/common/logging/proxyLogSink.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { ILogger, ILogItem, ILogSink } from '.'; 6 | 7 | /* 8 | * A log sink that writes information to another logger. 9 | */ 10 | export class ProxyLogSink implements ILogSink { 11 | constructor(private logger: ILogger | undefined) {} 12 | 13 | /** 14 | * @inheritdoc 15 | */ 16 | public async setup() { 17 | // no-op 18 | } 19 | 20 | /** 21 | * @inheritdoc 22 | */ 23 | public dispose() { 24 | this.logger = undefined; 25 | } 26 | 27 | /** 28 | * @inheritdoc 29 | */ 30 | public write(item: ILogItem): void { 31 | this.logger?.log(item); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/common/node15Internal.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | /** 6 | * URL prefix that Node 15 and onwards uses for its internals. 7 | */ 8 | export const node15InternalsPrefix = 'node:'; 9 | 10 | /** 11 | * Token the debugger uses to represent node internals. 12 | */ 13 | export const nodeInternalsToken = ''; 14 | -------------------------------------------------------------------------------- /src/common/random.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | /** 6 | * Creates a random integer in the range [min, max) 7 | */ 8 | export const randomInRange = (min: number, max: number) => 9 | min + Math.floor(Math.random() * (max - min)); 10 | -------------------------------------------------------------------------------- /src/common/terminalLinkProvider.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import type * as vscode from 'vscode'; 6 | 7 | /** 8 | * Terminal link provider available when running in the vscode UI. 9 | */ 10 | export interface ITerminalLinkProvider 11 | extends vscode.TerminalLinkProvider 12 | { 13 | /** 14 | * Turns on link handling in the given terminal. 15 | */ 16 | enableHandlingInTerminal(terminal: vscode.Terminal): void; 17 | } 18 | 19 | export const ITerminalLinkProvider = Symbol('ITerminalLinkProvider'); 20 | -------------------------------------------------------------------------------- /src/dap/logOmittedCalls.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export const logOmittedCalls = new WeakSet(); 6 | 7 | /** 8 | * Omits logging a call when the given object is used as parameters for 9 | * a method call. This is, at the moment, solely used to prevent logging 10 | * log output and getting into an feedback loop with the ConsoleLogSink. 11 | */ 12 | export const omitLoggingFor = (obj: T): T => { 13 | logOmittedCalls.add(obj); 14 | return obj; 15 | }; 16 | -------------------------------------------------------------------------------- /src/dap/protocolError.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import Dap from './api'; 6 | 7 | export class ProtocolError extends Error { 8 | public get cause(): Dap.Message { 9 | return this._cause; 10 | } 11 | 12 | protected _cause: Dap.Message; 13 | 14 | constructor(cause: Dap.Message | Dap.Error) { 15 | super('__errorMarker' in cause ? cause.error.format : cause.format); 16 | this._cause = '__errorMarker' in cause ? cause.error : cause; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/debugServerMain.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import 'reflect-metadata'; 6 | import { startDebugServer } from './debugServer'; 7 | 8 | let port = 0; 9 | let host: string | undefined; 10 | if (process.argv.length >= 3) { 11 | // Interpret the argument as either a port number, or 'address:port'. 12 | const address = process.argv[2]; 13 | const colonIndex = address.lastIndexOf(':'); 14 | if (colonIndex === -1) { 15 | port = +address; 16 | } else { 17 | host = address.substring(0, colonIndex); 18 | port = +address.substring(colonIndex + 1); 19 | } 20 | } 21 | startDebugServer(port, host); 22 | -------------------------------------------------------------------------------- /src/diagnosticTool/decisionButtons.tsx: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { FunctionComponent, h } from 'preact'; 6 | 7 | export const DecisionButtons = ( 8 | options: T[], 9 | ): FunctionComponent<{ 10 | value: T | undefined; 11 | onChange(option: T): void; 12 | }> => 13 | function DecisionButtons({ value, onChange }) { 14 | return ( 15 |
16 | {options.map(b => ( 17 | 24 | ))} 25 |
26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /src/diagnosticTool/index.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { join } from 'path'; 6 | 7 | export const toolPath = join(__dirname, 'diagnosticTool.js'); 8 | export const toolStylePath = join(__dirname, 'diagnosticTool.css'); 9 | -------------------------------------------------------------------------------- /src/diagnosticTool/useDump.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { Context, createContext } from 'preact'; 6 | import { useContext } from 'preact/hooks'; 7 | import { IDiagnosticDump } from '../adapter/diagnosics'; 8 | 9 | export const DumpContext: Context = createContext< 10 | IDiagnosticDump | undefined 11 | >(undefined); 12 | 13 | export const useDump = () => useContext(DumpContext) as IDiagnosticDump; 14 | -------------------------------------------------------------------------------- /src/targets/browser/unelevatedChome.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | import { CancellationToken } from 'vscode'; 5 | import { timeoutPromise } from '../../common/cancellation'; 6 | import Dap from '../../dap/api'; 7 | 8 | export async function launchUnelevatedChrome( 9 | dap: Dap.Api, 10 | chromePath: string, 11 | chromeArgs: string[], 12 | cancellationToken: CancellationToken, 13 | ): Promise { 14 | const response = dap.launchUnelevatedRequest({ 15 | process: chromePath, 16 | args: chromeArgs, 17 | }); 18 | 19 | await timeoutPromise(response, cancellationToken, 'Could not launch browser unelevated'); 20 | } 21 | -------------------------------------------------------------------------------- /src/targets/node/bootloader/logger.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | /* eslint-disable @typescript-eslint/no-unused-vars */ 6 | 7 | export const bootloaderLogger = { 8 | enabled: false, 9 | info: (...args: unknown[]) => { 10 | if (bootloaderLogger.enabled) { 11 | console.log(...args); 12 | } 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /src/targets/node/bundlePaths.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { join } from 'path'; 6 | 7 | export const watchdogPath = join(__dirname, 'watchdog.js'); 8 | export const bootloaderDefaultPath = join(__dirname, 'bootloader.js'); 9 | -------------------------------------------------------------------------------- /src/targets/node/createTargetId.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { randomBytes } from 'crypto'; 6 | 7 | export const createTargetId = () => randomBytes(12).toString('hex'); 8 | -------------------------------------------------------------------------------- /src/targets/node/extensionHostExtras.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { getSourceSuffix } from '../../adapter/templates'; 6 | 7 | /** 8 | * Expression to be evaluated to set that the debugger is successfully attached 9 | * and ready for extensions to start being debugged. 10 | * 11 | * See microsoft/vscode#106698. 12 | */ 13 | export const signalReadyExpr = () => `globalThis.__jsDebugIsReady = true; ` + getSourceSuffix(); 14 | -------------------------------------------------------------------------------- /src/targets/node/findOpenPort.ps1: -------------------------------------------------------------------------------- 1 | Get-NetTCPConnection | where Localport -eq 5000 | select Localport, OwningProcess 2 | -------------------------------------------------------------------------------- /src/targets/node/terminateProcess.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT_PID=$1 4 | SIGNAL=$2 5 | 6 | terminateTree() { 7 | for cpid in $(pgrep -P $1); do 8 | terminateTree $cpid 9 | done 10 | kill -$SIGNAL $1 > /dev/null 2>&1 11 | } 12 | 13 | terminateTree $ROOT_PID 14 | -------------------------------------------------------------------------------- /src/targets/targetOrigin.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export const ITargetOrigin = Symbol('ITargetOrigin'); 6 | 7 | /** 8 | * The target origin is the debug session ID (a GUID/UUID) in DAP which is 9 | * a parent to this session. 10 | */ 11 | export interface ITargetOrigin { 12 | readonly id: string; 13 | } 14 | 15 | /** 16 | * Immutable implementation of ITargetOrigin. 17 | */ 18 | export class TargetOrigin implements ITargetOrigin { 19 | constructor(public readonly id: string) {} 20 | } 21 | 22 | /** 23 | * A mutable version of ITargetOrigin. Used in the {@link DelegateLauncher}. 24 | */ 25 | export class MutableTargetOrigin implements ITargetOrigin { 26 | constructor(public id: string) {} 27 | } 28 | -------------------------------------------------------------------------------- /src/telemetry/experimentationService.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | export interface IExperiments { 6 | /** 7 | * Breakpoint helper prompt 8 | */ 9 | diagnosticPrompt: boolean; 10 | } 11 | 12 | export interface IExperimentationService { 13 | /** 14 | * Gets the treatment for the experiment. 15 | * @param name Name of the experiment 16 | * @param defaultValue Default to return if the call fails ot no 17 | * experimentation service is available. 18 | */ 19 | getTreatment( 20 | name: K, 21 | defaultValue: IExperiments[K], 22 | ): Promise; 23 | } 24 | 25 | export const IExperimentationService = Symbol('IExperimentationService'); 26 | -------------------------------------------------------------------------------- /src/telemetry/nullExperimentationService.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { injectable } from 'inversify'; 6 | import { IExperimentationService, IExperiments } from './experimentationService'; 7 | 8 | @injectable() 9 | export class NullExperimentationService implements IExperimentationService { 10 | /** 11 | * @inheritdoc 12 | */ 13 | getTreatment( 14 | _name: K, 15 | defaultValue: IExperiments[K], 16 | ): Promise { 17 | return Promise.resolve(defaultValue); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/telemetry/performance.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { ILogger, LogTag } from '../common/logging'; 6 | 7 | /** 8 | * Measures and logs the performance of decorated functions. 9 | */ 10 | export const logPerf = async ( 11 | logger: ILogger, 12 | name: string, 13 | fn: () => T | Promise, 14 | metadata: object = {}, 15 | ): Promise => { 16 | const start = Date.now(); 17 | try { 18 | return await fn(); 19 | } finally { 20 | logger.verbose(LogTag.PerfFunction, '', { 21 | method: name, 22 | duration: Date.now() - start, 23 | ...metadata, 24 | }); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /src/test/benchmark/formatMessage.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { IBenchmarkApi } from '@c4312/matcha'; 6 | import { formatMessage } from '../../adapter/messageFormat'; 7 | import { messageFormatters } from '../../adapter/objectPreview'; 8 | 9 | export default function(api: IBenchmarkApi) { 10 | api.bench('simple', () => { 11 | formatMessage( 12 | '', 13 | [{ type: 'number', value: 1234, description: '1234', subtype: undefined }], 14 | messageFormatters, 15 | ); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /src/test/benchmark/index.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { benchmark, grepMiddleware, PrettyReporter } from '@c4312/matcha'; 6 | import { readdirSync } from 'fs'; 7 | import 'reflect-metadata'; 8 | 9 | benchmark({ 10 | reporter: new PrettyReporter(process.stdout), 11 | middleware: process.argv[2] ? [grepMiddleware(process.argv[2])] : undefined, 12 | prepare(api) { 13 | for ( 14 | const file of readdirSync(__dirname).filter(f => f.endsWith('.js') && f !== 'index.js') 15 | ) { 16 | api.suite(file, () => require(`./${file}`).default(api)); 17 | } 18 | }, 19 | }) 20 | .then(() => process.exit(0)) 21 | .catch(err => { 22 | console.error(err); 23 | process.exit(1); 24 | }); 25 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-break-on-load-in-js-file-without-sourcemap.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:9:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-breakpoint-placement-end-function-stmt-babel.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | foo @ ${workspaceFolder}/sourceMapLocations/test.ts:6:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-breakpoint-placement-end-function-stmt-tsc.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | global.foo @ ${workspaceFolder}/sourceMapLocations/test.ts:6:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-breakpoint-placement-first-function-stmt-babel.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | foo @ ${workspaceFolder}/sourceMapLocations/test.ts:4:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-breakpoint-placement-first-function-stmt-tsc.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | global.foo @ ${workspaceFolder}/sourceMapLocations/test.ts:4:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-can-step-in-when-first-line-of-code-is-function.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:5:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused 11 | reason : step 12 | threadId : 13 | } 14 | global.double @ ${fixturesDir}/test.js:2:3 15 | @ ${fixturesDir}/test.js:5:1 16 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-condition-basic.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:2:3 8 | result: 2 9 | { 10 | allThreadsStopped : false 11 | description : Paused on debugger statement 12 | reason : pause 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/condition.js:5:1 16 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-condition-ignores-bp-with-invalid-condition.txt: -------------------------------------------------------------------------------- 1 | { 2 | category : stderr 3 | output : Syntax error setting breakpoint with condition ")(}{][.&" on line 2: Unexpected token ')' 4 | } 5 | { 6 | allThreadsStopped : false 7 | description : Paused on debugger statement 8 | reason : pause 9 | threadId : 10 | } 11 | @ ${workspaceFolder}/web/condition.js:5:1 12 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-condition-ignores-error-by-default.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:5:1 8 | { 9 | category : stderr 10 | column : 64 11 | line : 1 12 | output : Breakpoint condition error: oh no 13 | source : { 14 | name : /VM 15 | path : /VM 16 | sourceReference : 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-condition-invalid.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:5:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-condition-pauses-on-error.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:2:3 8 | stderr> Breakpoint condition error: oh no 9 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-inline.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/inlinescript.html:3:5 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-predictor-warns-on-inaccessible-directory-vscode100018.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/simpleNode/index.js:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-query-params.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:9:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on debugger statement 11 | reason : pause 12 | threadId : 13 | } 14 | @ ${workspaceFolder}/web/script.js:10:1 15 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-remove.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | Window.foo @ ${workspaceFolder}/web/script.js:2:3 8 | @ ${workspaceFolder}/web/script.js:9:1 9 | { 10 | allThreadsStopped : false 11 | description : Paused on debugger statement 12 | reason : pause 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/script.js:10:1 16 | { 17 | allThreadsStopped : false 18 | description : Paused on debugger statement 19 | reason : pause 20 | threadId : 21 | } 22 | @ localhost꞉8001/test.js:2:1 23 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-script.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:9:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on debugger statement 11 | reason : pause 12 | threadId : 13 | } 14 | @ ${workspaceFolder}/web/script.js:10:1 15 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-configure-source-map-thats-path-mapped.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | Window.foo @ ${workspaceFolder}/web/tmp/app.ts:2:3 8 | @ ${workspaceFolder}/web/tmp/app.ts:5:1 9 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-custom-inner-html.txt: -------------------------------------------------------------------------------- 1 | Not pausing on innerHTML 2 | Evaluating#1: document.querySelector('div').innerHTML = 'foo'; 3 | Pausing on innerHTML 4 | Evaluating#2: document.querySelector('div').innerHTML = 'bar'; 5 | { 6 | allThreadsStopped : false 7 | description : Set innerHTML 8 | reason : function breakpoint 9 | text : Paused on instrumentation breakpoint "Set innerHTML" 10 | threadId : 11 | } 12 | { 13 | allThreadsContinued : false 14 | } 15 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-disables-entrypoint-breakpoint-when-in-file-vscode230201.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused 4 | reason : step 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:5:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-does-not-interrupt-stepin-with-instrumentation-breakpoint-1665.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: test() 2 | { 3 | allThreadsStopped : false 4 | description : Paused on debugger statement 5 | reason : pause 6 | threadId : 7 | } 8 | Window.test @ /VM:4:13 9 | @ eval1.js:1:1 10 | { 11 | allThreadsStopped : false 12 | description : Paused 13 | reason : step 14 | threadId : 15 | } 16 | Window.test @ /VM:5:13 17 | @ eval1.js:1:1 18 | { 19 | allThreadsStopped : false 20 | description : Paused 21 | reason : step 22 | threadId : 23 | } 24 | @ foo.js:2:15 25 | Window.test @ /VM:5:15 26 | @ eval1.js:1:1 27 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-does-not-interrupt-stepover-with-instrumentation-breakpoint-1556.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: test() 2 | { 3 | allThreadsStopped : false 4 | description : Paused on debugger statement 5 | reason : pause 6 | threadId : 7 | } 8 | Window.test @ /VM:4:13 9 | @ eval1.js:1:1 10 | { 11 | allThreadsStopped : false 12 | description : Paused 13 | reason : step 14 | threadId : 15 | } 16 | Window.test @ /VM:5:13 17 | @ eval1.js:1:1 18 | { 19 | allThreadsStopped : false 20 | description : Paused 21 | reason : step 22 | threadId : 23 | } 24 | Window.test @ /VM:13:13 25 | @ eval1.js:1:1 26 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-excludes-callers.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | Window.bar @ /VM:11:11 8 | Window.foo @ /VM:3:11 9 | @ /VM:14:9 10 | { 11 | allThreadsStopped : false 12 | description : Paused on debugger statement 13 | reason : pause 14 | threadId : 15 | } 16 | Window.bar @ /VM:11:11 17 | Window.baz @ /VM:7:11 18 | @ /VM:15:9 19 | { 20 | allThreadsStopped : false 21 | description : Paused on debugger statement 22 | reason : pause 23 | threadId : 24 | } 25 | Window.bar @ /VM:11:11 26 | Window.baz @ /VM:7:11 27 | @ /VM:17:9 28 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-first-line-breaks-if-requested.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/simpleNode/index.js:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-first-line-does-not-break-if-not-requested.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/simpleNode/index.js:2:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-gets-correct-line-number-with-babel-code-407.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | { 8 | allThreadsStopped : false 9 | description : Paused on breakpoint 10 | reason : breakpoint 11 | threadId : 12 | } 13 | App @ ${workspaceFolder}/babelLineNumbers/app.tsx:2:3 14 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-handles-hot-transpiled-modules.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | double @ ${workspaceFolder}/tsNode/double.ts:12:2 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-condition-exact.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:2:3 8 | result: 1 9 | { 10 | allThreadsStopped : false 11 | description : Paused on debugger statement 12 | reason : pause 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/condition.js:5:1 16 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-condition-greater-than.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:2:3 8 | result: 3 9 | { 10 | allThreadsStopped : false 11 | description : Paused on breakpoint 12 | reason : breakpoint 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/condition.js:2:3 16 | result: 4 17 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-condition-invalid.txt: -------------------------------------------------------------------------------- 1 | stderr> Invalid hit condition "abc". Expected an expression like "> 42" or "== 2". 2 | { 3 | allThreadsStopped : false 4 | description : Paused on debugger statement 5 | reason : pause 6 | threadId : 7 | } 8 | @ ${workspaceFolder}/web/condition.js:5:1 9 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-condition-less-than.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/condition.js:2:3 8 | result: 0 9 | { 10 | allThreadsStopped : false 11 | description : Paused on breakpoint 12 | reason : breakpoint 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/condition.js:2:3 16 | result: 1 17 | { 18 | allThreadsStopped : false 19 | description : Paused on debugger statement 20 | reason : pause 21 | threadId : 22 | } 23 | @ ${workspaceFolder}/web/condition.js:5:1 24 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-count-can-change-breakpoint-after-being-set.txt: -------------------------------------------------------------------------------- 1 | { 2 | breakpoints : [ 3 | [0] : { 4 | column : 13 5 | id : 6 | line : 4 7 | source : { 8 | name : /VM 9 | path : /VM 10 | sourceReference : 11 | } 12 | verified : true 13 | } 14 | ] 15 | } 16 | { 17 | breakpoints : [ 18 | [0] : { 19 | column : 13 20 | id : 21 | line : 4 22 | source : { 23 | name : /VM 24 | path : /VM 25 | sourceReference : 26 | } 27 | verified : true 28 | } 29 | ] 30 | } 31 | Evaluating#1: foo(); 32 | result: 7 33 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-count-does-not-validate-or-hit-invalid-breakpoint.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | for (let i = 0; i < 10; i++) { 4 | console.log(i); 5 | console.log(i); 6 | console.log(i); 7 | } 8 | } 9 | 10 | { 11 | breakpoints : [ 12 | [0] : { 13 | id : 14 | message : Unbound breakpoint 15 | verified : false 16 | } 17 | ] 18 | } 19 | { 20 | category : stderr 21 | output : Invalid hit condition "potato". Expected an expression like "> 42" or "== 2". 22 | } 23 | Evaluating#2: foo(); 24 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-count-implies-equal-1698.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | for (let i = 0; i < 10; i++) { 4 | console.log(i); 5 | console.log(i); 6 | console.log(i); 7 | } 8 | } 9 | 10 | { 11 | breakpoints : [ 12 | [0] : { 13 | column : 13 14 | id : 15 | line : 4 16 | source : { 17 | name : localhost꞉8001/eval1.js 18 | path : localhost꞉8001/eval1.js 19 | sourceReference : 20 | } 21 | verified : true 22 | } 23 | ] 24 | } 25 | Evaluating#2: foo(); 26 | result: 4 27 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hit-count-works-for-valid.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | for (let i = 0; i < 10; i++) { 4 | console.log(i); 5 | console.log(i); 6 | console.log(i); 7 | } 8 | } 9 | 10 | { 11 | breakpoints : [ 12 | [0] : { 13 | column : 13 14 | id : 15 | line : 4 16 | source : { 17 | name : localhost꞉8001/eval1.js 18 | path : localhost꞉8001/eval1.js 19 | sourceReference : 20 | } 21 | verified : true 22 | } 23 | ] 24 | } 25 | Evaluating#2: foo(); 26 | result: 4 27 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-adjusts-breakpoints-after-already-running-524.txt: -------------------------------------------------------------------------------- 1 | { 2 | breakpoints : [ 3 | [0] : { 4 | column : 3 5 | id : 6 | line : 17 7 | source : { 8 | name : tsNode/double.ts 9 | path : ${workspaceFolder}/tsNode/double.ts 10 | sourceReference : 11 | } 12 | verified : true 13 | } 14 | ] 15 | } 16 | { 17 | allThreadsStopped : false 18 | description : Paused on breakpoint 19 | reason : breakpoint 20 | threadId : 21 | } 22 | double @ ${workspaceFolder}/tsNode/double.ts:17:3 23 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-adjusts-breakpoints.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | triple @ ${workspaceFolder}/tsNode/double.ts:7:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-avoids-double-pathmapping-1617.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${fixturesDir}/src/double.js:1:27 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-breaks-on-first-line.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/tsNode/double.ts:4:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-does-not-adjust-already-correct.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/tsNode/matching-line.ts:3:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-user-defined-bp-on-first-line.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/tsNode/log.ts:2:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-hot-transpiled-works-in-remote-workspaces.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | triple @ ${workspaceFolder}/tsNode/double.ts:7:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-ignores-source-url-query-string-1225.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/sourceQueryString/input.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-absolute-path-in-nested-module.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/nestedAbsRoot/test.js:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-inline.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/inlinescriptpause.html:8:5 8 | { 9 | allThreadsStopped : false 10 | description : Paused on breakpoint 11 | reason : breakpoint 12 | threadId : 13 | } 14 | Window.foo @ ${workspaceFolder}/web/inlinescriptpause.html:6:7 15 | @ ${workspaceFolder}/web/inlinescriptpause.html:9:5 16 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-overwrite.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | var x = 3; 4 | return 2; 5 | } 6 | 7 | { 8 | allThreadsStopped : false 9 | description : Paused on breakpoint 10 | reason : breakpoint 11 | threadId : 12 | } 13 | Window.foo @ localhost꞉8001/eval1.js:3:19 14 | @ localhost꞉8001/test.js:1:1 15 | { 16 | allThreadsStopped : false 17 | description : Paused on debugger statement 18 | reason : pause 19 | threadId : 20 | } 21 | @ localhost꞉8001/test.js:2:1 22 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-ref.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | return 2; 4 | } 5 | 6 | Evaluating#2: foo(); 7 | { 8 | allThreadsStopped : false 9 | description : Paused on breakpoint 10 | reason : breakpoint 11 | threadId : 12 | } 13 | Window.foo @ localhost꞉8001/eval1.js:3:9 14 | @ localhost꞉8001/eval2.js:1:1 15 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-remove.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: 2 | function foo() { 3 | return 2; 4 | } 5 | 6 | { 7 | allThreadsStopped : false 8 | description : Paused on debugger statement 9 | reason : pause 10 | threadId : 11 | } 12 | @ localhost꞉8001/test.js:2:1 13 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-script.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:10:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on breakpoint 11 | reason : breakpoint 12 | threadId : 13 | } 14 | Window.bar @ ${workspaceFolder}/web/script.js:6:3 15 | Window.foo @ ${workspaceFolder}/web/script.js:2:3 16 | @ ${workspaceFolder}/web/script.js:11:1 17 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-sets-breakpoints-in-sourcemapped-nodemodules-with-absolute-root.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | double @ ${workspaceFolder}/nodeModuleBreakpoint/node_modules/@c4312/absolute-sourceroot/src/index.ts:2:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-sets-breakpoints-in-sourcemapped-nodemodules.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | double @ ${workspaceFolder}/nodeModuleBreakpoint/node_modules/@c4312/foo/src/index.ts:2:3 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-source-map-remove.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | foo @ ${workspaceFolder}/web/browserify/module1.ts:3:3 8 | Window.bar @ ${workspaceFolder}/web/browserify/module2.ts:3:3 9 | @ localhost꞉8001/browserify/test.js:1:8 10 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-launched-source-map.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | Window.bar @ ${workspaceFolder}/web/browserify/module2.ts:3:3 8 | @ localhost꞉8001/browserify/test.js:1:8 9 | { 10 | allThreadsStopped : false 11 | description : Paused on debugger statement 12 | reason : pause 13 | threadId : 14 | } 15 | foo @ ${workspaceFolder}/web/browserify/module1.ts:3:3 16 | Window.bar @ ${workspaceFolder}/web/browserify/module2.ts:3:3 17 | @ localhost꞉8001/browserify/test.js:1:8 18 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-lazy-async-stack-sets-eagerly-on-bp.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/asyncStack.js:2:3 8 | ----setTimeout---- 9 | @ ${workspaceFolder}/web/asyncStack.js:1:1 10 | { 11 | allThreadsStopped : false 12 | description : Paused on breakpoint 13 | reason : breakpoint 14 | threadId : 15 | } 16 | @ ${workspaceFolder}/web/asyncStack.js:5:5 17 | ----setTimeout---- 18 | @ ${workspaceFolder}/web/asyncStack.js:4:3 19 | ----setTimeout---- 20 | @ ${workspaceFolder}/web/asyncStack.js:1:1 21 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-lazy-async-stack-sets-stack-on-pause.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/asyncStack.js:2:3 8 | { 9 | allThreadsStopped : false 10 | description : Paused on debugger statement 11 | reason : pause 12 | threadId : 13 | } 14 | @ ${workspaceFolder}/web/asyncStack.js:5:5 15 | ----setTimeout---- 16 | @ ${workspaceFolder}/web/asyncStack.js:4:3 17 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-logpoints-basic.txt: -------------------------------------------------------------------------------- 1 | stdout> 123 2 | stdout> {foo: 'bar'} 3 | stdout> > {foo: 'bar'} 4 | stdout> > arg1: {foo: 'bar'} 5 | stdout> 1 6 | stdout> foo 1 bar 7 | stdout> foo barbaz 8 | stdout> barbaz 9 | stdout> barbaz 10 | stdout> Error: oof 11 | at eval (logpoint-.cdp:3:11) 12 | at eval (logpoint-.cdp:7:3) 13 | at f (http://localhost:8001/logging.js:22:3) 14 | at http://localhost:8001/logging.js:24:1 15 | stdout> hi 16 | stdout> {foo: 'bar'} 17 | stdout> > {foo: 'bar'} 18 | stdout> > arg1: {foo: 'bar'} 19 | stdout> {f: ƒ} 20 | stdout> > {f: ƒ} 21 | stdout> > arg1: {f: ƒ} 22 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-logpoints-callstack.txt: -------------------------------------------------------------------------------- 1 | { 2 | category : stdout 3 | column : 3 4 | line : 22 5 | output : 123 6 | source : { 7 | name : localhost꞉8001/logging.js 8 | path : ${workspaceFolder}/web/logging.js 9 | sourceReference : 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-logpoints-no-double-log.txt: -------------------------------------------------------------------------------- 1 | stdout> LOG1 2 | stdout> DONE1 3 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-logpoints-returnvalue.txt: -------------------------------------------------------------------------------- 1 | stdout> doubled: 14 2 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-normalizes-webpack-nul-byte-1080.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/webpackNulByte/src/#hello/world.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-prefers-file-uris-to-url-1598.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:9:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on debugger statement 11 | reason : pause 12 | threadId : 13 | } 14 | @ ${workspaceFolder}/web/script.js:10:1 15 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-reevaluates-breakpoints-when-new-sources-come-in-600.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/hello.js:2:3 8 | ----setInterval---- 9 | @ ${workspaceFolder}/web/hello.js:1:1 10 | { 11 | allThreadsStopped : false 12 | description : Paused on breakpoint 13 | reason : breakpoint 14 | threadId : 15 | } 16 | @ ${workspaceFolder}/web/hello.js:2:3 17 | ----setInterval---- 18 | @ ${workspaceFolder}/web/hello.js:1:1 19 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-resolves-sourcemaps-in-paths-containing-glob-patterns-vscode166400.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/glob(chars)/app.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-restart-frame.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/restart.js:6:3 8 | @ ${workspaceFolder}/web/restart.js:7:3 9 | { 10 | allThreadsStopped : false 11 | description : Paused on frame entry 12 | reason : frame_entry 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/restart.js:4:3 16 | @ ${workspaceFolder}/web/restart.js:7:3 17 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-sets-file-uri-breakpoints-predictably-1748.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${fixturesDir}/scripts/hello.js:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-stop-on-entry-on-ts-file-reports-as-entry.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/tsNodeApp/app.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/breakpoints/breakpoints-user-defined-bp-on-first-line-with-stop-on-entry-on-ts-file-reports-as-breakpoint.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/tsNodeApp/app.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/browser/browser-launch-environment-variables.txt: -------------------------------------------------------------------------------- 1 | result: 0 2 | -------------------------------------------------------------------------------- /src/test/browser/browser-launch-runtime-args.txt: -------------------------------------------------------------------------------- 1 | > result: (2) [678, 456] 2 | 0: 678 3 | 1: 456 4 | length: 2 5 | > [[Prototype]]: Array(0) 6 | > [[Prototype]]: Object 7 | -------------------------------------------------------------------------------- /src/test/browser/performance.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai'; 2 | /*--------------------------------------------------------- 3 | * Copyright (C) Microsoft Corporation. All rights reserved. 4 | *--------------------------------------------------------*/ 5 | import { itIntegrates } from '../testIntegrationUtils'; 6 | 7 | describe('performance', () => { 8 | itIntegrates('gets performance information', async ({ r }) => { 9 | const p = await r.launchUrlAndLoad('index.html'); 10 | const res = await p.dap.getPerformance({}); 11 | expect(res.error).to.be.undefined; 12 | expect(res.metrics).to.not.be.empty; 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/test/console/console-api-format-format-string.txt: -------------------------------------------------------------------------------- 1 | Evaluating: 'console.log('Log')' 2 | stdout> Log 3 | 4 | Evaluating: 'console.info('Info')' 5 | stdout> Info 6 | 7 | Evaluating: 'console.warn('Warn')' 8 | stderr> Warn 9 | 10 | Evaluating: 'console.error('Error')' 11 | stderr> Error 12 | 13 | Evaluating: 'console.assert(false, 'Assert')' 14 | stderr> Assert 15 | 16 | Evaluating: 'console.assert(false)' 17 | stderr> Assertion failed 18 | 19 | Evaluating: 'console.trace('Trace')' 20 | stdout> Trace 21 | 22 | Evaluating: 'console.count('Counter')' 23 | stdout> Counter: 1 24 | 25 | Evaluating: 'console.count('Counter')' 26 | stdout> Counter: 2 27 | 28 | -------------------------------------------------------------------------------- /src/test/console/console-format-adds-error-traces-if-they-do-not-exist.txt: -------------------------------------------------------------------------------- 1 | Evaluating: 'setTimeout(() => { throw "asdf" }, 0) ' 2 | stderr> Uncaught Error asdf 3 | at (/VM:1:20) 4 | --- setTimeout --- 5 | at (/VM:1:1) 6 | stderr> 7 | > Uncaught Error asdf 8 | at (/VM:1:20) 9 | --- setTimeout --- 10 | at (/VM:1:1) 11 | stderr> 12 | @ /VM:1:20 13 | ◀ setTimeout ▶ 14 | @ /VM:1 15 | 16 | { 17 | category : stderr 18 | column : 20 19 | line : 1 20 | output : Uncaught Error asdf at (/VM:1:20) --- setTimeout --- at (/VM:1:1) 21 | source : { 22 | name : /VM 23 | path : /VM 24 | sourceReference : 25 | } 26 | variablesReference : 27 | } 28 | -------------------------------------------------------------------------------- /src/test/console/console-format-ansi-colorization.txt: -------------------------------------------------------------------------------- 1 | stdout> This is a red message 2 | In context watch: 3 | result: '\x1b[31mThis is a red message\x1b[0m' 4 | > result: {x: '\x1b[31mThis is a red message\x1b[0m'} 5 | x: '\x1b[31mThis is a red message\x1b[0m' 6 | > [[Prototype]]: Object 7 | In context variables: 8 | result: '\x1b[31mThis is a red message\x1b[0m' 9 | > result: {x: '\x1b[31mThis is a red message\x1b[0m'} 10 | x: '\x1b[31mThis is a red message\x1b[0m' 11 | > [[Prototype]]: Object 12 | -------------------------------------------------------------------------------- /src/test/console/console-format-applies-skipfiles-to-logged-stacks.txt: -------------------------------------------------------------------------------- 1 | logged hello world 2 | at dont-ignore-me.js:1:1 3 | -------------------------------------------------------------------------------- /src/test/console/console-format-custom-symbol.txt: -------------------------------------------------------------------------------- 1 | > result: hello a 2 | > prop: hello b 3 | > [[Prototype]]: Object 4 | -------------------------------------------------------------------------------- /src/test/console/console-format-custom-tostring.txt: -------------------------------------------------------------------------------- 1 | > result: hello a 2 | > prop: hello b 3 | > [[Prototype]]: Object 4 | -------------------------------------------------------------------------------- /src/test/console/console-format-error-traces-in-source-maps.txt: -------------------------------------------------------------------------------- 1 | Evaluating: 'try { throwError() } catch (e) { console.error(e) }' 2 | stderr> Error 3 | at throwError (${workspaceFolder}/web/browserify/module1.ts:6:9) 4 | at :1:7 {stack: 'Error 5 | at throwError (http://localhost:800…erify/bundle.js:23:11) 6 | at :1:7'} 7 | 8 | stderr> 9 | > Error 10 | at throwError (${workspaceFolder}/web/browserify/module1.ts:6:9) 11 | at :1:7 {stack: 'Error 12 | at throwError (http://localhost:800…erify/bundle.js:23:11) 13 | at :1:7'} 14 | stderr> > arg0: Error\n at throwError (http://localhost:8001/browserify/bundle.js:23:11)\n at :1:7 {stack: 'Error\n at throwError (http://localhost:800…erify/bundle.js:23:11)\n at :1:7'} 15 | stderr> @ /VM:1:42 16 | 17 | -------------------------------------------------------------------------------- /src/test/console/console-format-ext-handling.txt: -------------------------------------------------------------------------------- 1 | "helloworldnew line\nasdfnow ext\nthis should be bulkedwith this!\nWaiting for the debugger to disconnect...\ntrailing\n" 2 | -------------------------------------------------------------------------------- /src/test/console/console-format-nodes.txt: -------------------------------------------------------------------------------- 1 | > result: 
...
 2 | 0: '\n Content\n ' 3 | > 1: ...

 4 | 0: 'Paragaph' 5 | 2: '\n More content\n ' 6 | > 3:  7 | 4: '\n ' 8 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-cd.txt: -------------------------------------------------------------------------------- 1 | "|": [ 2 | [0] : { 3 | label : cd top 4 | length : 0 5 | start : 0 6 | } 7 | ] 8 | "cd|": [ 9 | [0] : { 10 | label : cd top 11 | length : 2 12 | start : 0 13 | } 14 | ] 15 | "cd |": [ 16 | [0] : { 17 | label : cd top 18 | length : 3 19 | start : 0 20 | } 21 | ] 22 | "cd t|": [ 23 | [0] : { 24 | label : cd top 25 | length : 4 26 | start : 0 27 | } 28 | ] 29 | "cd h|": [ 30 | ] 31 | "c|d": [ 32 | [0] : { 33 | label : cd top 34 | length : 2 35 | start : 0 36 | } 37 | ] 38 | "co|": [ 39 | ] 40 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-copy-via-function.txt: -------------------------------------------------------------------------------- 1 | { 2 | text : hello 3 | } 4 | { 5 | text : 123n 6 | } 7 | { 8 | text : NaN 9 | } 10 | { 11 | text : { "foo": "bar", "baz": { "a": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "b": 123 } } 12 | } 13 | { 14 | text : function hello() { return "world" } 15 | } 16 | { 17 | text : { "foo": true, "recurse": "[Circular ~]" } 18 | } 19 | { 20 | text : 1267650600228229401496703205376n 21 | } 22 | { 23 | text :
hi
24 | } 25 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-inspect.txt: -------------------------------------------------------------------------------- 1 | { 2 | column : 13 3 | line : 1 4 | source : { 5 | name : test.js 6 | path : test.js 7 | sourceReference : 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-output-slots-2.txt: -------------------------------------------------------------------------------- 1 | result: 2 | stdout> ↳ 1 3 | stdout> 2 4 | stderr> Uncaught Object 5 | stderr> > Uncaught Object 6 | stderr> > arg0: {foo: 3} 7 | stderr> 8 | @ /VM:5:9 9 | ◀ setTimeout ▶ 10 | @ /VM:3:7 11 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-output-slots.txt: -------------------------------------------------------------------------------- 1 | result: 2 | stdout> 1 3 | stdout> ↳ 2 4 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-queryobjects.txt: -------------------------------------------------------------------------------- 1 | stdout> > (2) [Foo, Foo] 2 | stdout> > 0: Foo {value: 1} 3 | stdout> > 1: Foo {value: 2} 4 | stdout> length: 2 5 | stdout> > [[Prototype]]: Array(0) 6 | stdout> > [[Prototype]]: Object 7 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-returnvalue.txt: -------------------------------------------------------------------------------- 1 | return 42: 2 | 3 | result: 42 4 | return { a: { b: true } }: 5 | 6 | > result: {a: {…}} 7 | > a: {b: true} 8 | > [[Prototype]]: Object 9 | return undefined: 10 | 11 | result: undefined 12 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-selected-context.txt: -------------------------------------------------------------------------------- 1 | --- Evaluating in page 2 | Pausing... 3 | Paused 4 | result: false 5 | Resumed 6 | --- Evaluating in worker 7 | Paused 8 | result: true 9 | Resumed 10 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-shadowed-variables.txt: -------------------------------------------------------------------------------- 1 | result: 3 2 | line 1: 3 | result: 3 4 | line 2: 5 | result: 1 6 | line 3: 7 | result: 1 8 | line 4: 9 | result: 2 10 | line 5: 11 | result: 2 12 | line 6: 13 | result: 3 14 | line 7: 15 | result: 3 16 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-supports-bigint-map-keys-1277.txt: -------------------------------------------------------------------------------- 1 | > result: Map(2) {size: 2, 1n => one, 2n => two} 2 | > 0: {1n => "one"} 3 | > 1: {2n => "two"} 4 | size: 2 5 | > [[Prototype]]: Map 6 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-supports-location-lookup.txt: -------------------------------------------------------------------------------- 1 | 2 | > result: ƒ printArr(arr) { 3 | for (const num of arr) { 4 | console.log(plusTwo(num)); 5 | } 6 | } 7 | > arguments: (...) 8 | > caller: (...) 9 | length: 1 10 | name: 'printArr' 11 | > prototype: {constructor: ƒ} 12 | [[FunctionLocation]]: @ ${workspaceFolder}/web/basic.ts:5 13 | > [[Prototype]]: ƒ () 14 | > [[Scopes]]: Scopes[1] 15 | { 16 | column : 18 17 | line : 5 18 | source : { 19 | name : basic.ts 20 | path : ${workspaceFolder}/web/basic.ts 21 | sourceReference : 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/evaluate/evaluate-valueformatter.txt: -------------------------------------------------------------------------------- 1 | result: 2a 2 | 3 | result: 15a4f9d339f5e8dd2f8dd19bc149ff5e4f15a1b5 4 | 5 | result: 68656c6c6f20776f726c64 6 | 7 | > result: {a: 'hello', b: 42, c: true} 8 | a: 68656c6c6f 9 | b: 2a 10 | c: true 11 | > [[Prototype]]: Object 12 | 13 | -------------------------------------------------------------------------------- /src/test/extension/profiling-cpu-profiling-breakpoints-runs-until-a-breakpoint-is-hit.txt: -------------------------------------------------------------------------------- 1 | paused event{ 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | finished profile{ 8 | label : 9 | running : false 10 | } 11 | reenabled breakpoint{ 12 | breakpoint : { 13 | column : 1 14 | id : 0 15 | line : 20 16 | source : { 17 | name : simpleNode/profilePlayground.js 18 | path : ${workspaceFolder}/simpleNode/profilePlayground.js 19 | sourceReference : 0 20 | } 21 | verified : true 22 | } 23 | reason : changed 24 | } 25 | -------------------------------------------------------------------------------- /src/test/extension/profiling-heap-profiling-breakpoints-runs-until-a-breakpoint-is-hit.txt: -------------------------------------------------------------------------------- 1 | paused event{ 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | finished profile{ 8 | label : 9 | running : false 10 | } 11 | reenabled breakpoint{ 12 | breakpoint : { 13 | column : 1 14 | id : 0 15 | line : 20 16 | source : { 17 | name : simpleNode/profilePlayground.js 18 | path : ${workspaceFolder}/simpleNode/profilePlayground.js 19 | sourceReference : 0 20 | } 21 | verified : true 22 | } 23 | reason : changed 24 | } 25 | -------------------------------------------------------------------------------- /src/test/framework/react-hit-breakpoint.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | App @ ${fixturesDir}/react-test/src/App.tsx:6:1 8 | -------------------------------------------------------------------------------- /src/test/framework/react-js-hit-breakpoint.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | App @ ${fixturesDir}/react-test/src/App.js:6:1 8 | -------------------------------------------------------------------------------- /src/test/infra/infra.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { itIntegrates } from '../testIntegrationUtils'; 6 | 7 | describe('infra', () => { 8 | itIntegrates('initialize', async ({ r }) => { 9 | r.log(await r.initialize); 10 | r.assertLog(); 11 | }); 12 | 13 | it('imports win32 app container tokens', async () => { 14 | if (process.platform === 'win32') { 15 | await import('@vscode/win32-app-container-tokens'); // should not fail 16 | } 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-adjusts-to-compiles-file-if-it-exists.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/basic.ts:21:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-attaching-attaches-children-of-child-processes.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | global.foo @ ${fixturesDir}/child.js:1:19 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-attaching-attaches-to-cluster-processes.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-attaching-attaches-to-existing-processes.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:21 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-attaching-restarts-if-requested.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | { 8 | allThreadsStopped : false 9 | description : Paused on debugger statement 10 | reason : pause 11 | threadId : 12 | } 13 | @ ${fixturesDir}/test.js:1:21 14 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-attaching-retries-attachment.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:21 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-chakracore-string-value.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | > result: 'hello world!' -------------------------------------------------------------------------------- /src/test/node/node-runtime-child-processes-debugs.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | result: 'It works!' 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-debugs-child-processes.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused 4 | reason : step 5 | threadId : 6 | } 7 | result: 'It works!' 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-debugs-worker-threads.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:6:5 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-inspect-flag-handling-does-not-break-with-inspect-flag.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:2:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-inspect-flag-handling-treats-inspect-brk-as-stoponentry.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-reads-the-envfile.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | result: '{"a":"foo","b":"overwritten","c":"inherited"}' 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-scripts-with-http-urls.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/urlSourcemap/index.ts:3:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-sets-arguments.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | > result: (3) ['--some', 'very fancy', '--arguments'] 8 | 0: '--some' 9 | 1: 'very fancy' 10 | 2: '--arguments' 11 | length: 3 12 | > [[Prototype]]: Array(0) 13 | > [[Prototype]]: Object 14 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-sets-environment-variables.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | result: 'world' 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-sets-sourcemapoverrides-from-the-cwd.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | ./index.ts @ ${workspaceFolder}/simpleNode/simpleWebpack.ts:1:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-sets-the-cwd.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | result: '${workspaceFolder}' 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-simple-script.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:2:1 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-simpleportattach-allows-inspect-brk-in-npm-scripts.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | stdout> NODE_OPTIONS= undefined 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-simpleportattach-allows-simple-port-attachment.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | stdout> NODE_OPTIONS= undefined 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-simpleportattach-terminates-when-inspector-closed.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-simpleportattach-terminates-when-process-killed.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-with-delay-caught.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-with-delay-caughtinusercode.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-with-delay-rethrown.txt: -------------------------------------------------------------------------------- 1 | exports.rethrown @ ${workspaceFolder}/simpleNode/skippedScript.js:17:5 2 | @ ${workspaceFolder}/simpleNode/skipFiles.js:15:23 3 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-with-delay-uncaught.txt: -------------------------------------------------------------------------------- 1 | exports.uncaught @ ${workspaceFolder}/simpleNode/skippedScript.js:2:3 2 | @ ${workspaceFolder}/simpleNode/skipFiles.js:15:23 3 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-without-delay-caught.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-without-delay-caughtinusercode.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-without-delay-rethrown.txt: -------------------------------------------------------------------------------- 1 | exports.rethrown @ ${workspaceFolder}/simpleNode/skippedScript.js:17:5 2 | @ ${workspaceFolder}/simpleNode/skipFiles.js:15:23 3 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-skipfiles-without-delay-uncaught.txt: -------------------------------------------------------------------------------- 1 | exports.uncaught @ ${workspaceFolder}/simpleNode/skippedScript.js:2:3 2 | @ ${workspaceFolder}/simpleNode/skipFiles.js:15:23 3 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-stoponentry-launches-and-infers-entry-from-args.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:9 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-stoponentry-sets-an-explicit-stop-on-entry-point.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:9 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-stoponentry-stops-with-a-breakpoint-elsewhere-515.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:9 8 | -------------------------------------------------------------------------------- /src/test/node/node-runtime-stoponentry-stops-with-a-program-provided.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : entry 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:9 8 | -------------------------------------------------------------------------------- /src/test/reporters/goldenTextReporterUtils.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as mocha from 'mocha'; 6 | import { GoldenText } from '../goldenText'; 7 | 8 | export interface IGoldenReporterTextTest extends mocha.Runnable { 9 | goldenText: GoldenText; 10 | } 11 | -------------------------------------------------------------------------------- /src/test/reporters/logReporterUtils.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import mocha from 'mocha'; 6 | import os from 'os'; 7 | import path from 'path'; 8 | 9 | export interface TestWithLogfile extends mocha.Test { 10 | logPath?: string; 11 | } 12 | 13 | export function getLogFileForTest(testTitlePath: string) { 14 | return path.join(os.tmpdir(), `${testTitlePath.replace(/[^a-z0-9]/gi, '-')}.json`); 15 | } 16 | -------------------------------------------------------------------------------- /src/test/resourceProvider/resourceprovider-applies-cookies.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | foo @ ${workspaceFolder}/web/cookies/module1.ts:3:3 8 | Object.bar @ ${workspaceFolder}/web/cookies/module2.ts:3:3 9 | 3../module1 @ ${workspaceFolder}/web/cookies/pause.ts:4:4 10 | Window.o @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 11 | Window.r @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 12 | @ ${workspaceFolder}/node_modules/browser-pack/_prelude.js:1:1 13 | -------------------------------------------------------------------------------- /src/test/resourceProvider/resourceprovider-follows-redirects.txt: -------------------------------------------------------------------------------- 1 | { 2 | reason : new 3 | source : { 4 | name : redirect-test/module1.ts 5 | path : ${workspaceFolder}/web/redirect-test/module1.ts 6 | sourceReference : 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/test/sources/pretty-print-sources-base.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/pretty/ugly.js:5:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on breakpoint 11 | reason : breakpoint 12 | threadId : 13 | } 14 | @ ${workspaceFolder}/web/pretty/ugly.js-pretty.js:11:1 15 | { 16 | allThreadsContinued : false 17 | threadId : 18 | } 19 | { 20 | reason : new 21 | source : { 22 | name : pretty/ugly.js-pretty.js 23 | path : ${workspaceFolder}/web/pretty/ugly.js-pretty.js 24 | sourceReference : 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/sources/pretty-print-sources-eval-sources-929.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: let n=1;for(let l=0;l 7 | } 8 | @ /VM:1:48 9 | { 10 | allThreadsStopped : false 11 | description : Paused on debugger statement 12 | reason : pause 13 | threadId : 14 | } 15 | @ ${workspaceFolder}/web/46947589.js-pretty.js:4:3 16 | { 17 | allThreadsContinued : false 18 | threadId : 19 | } 20 | { 21 | reason : new 22 | source : { 23 | name : 46947589.js-pretty.js 24 | path : ${workspaceFolder}/web/46947589.js-pretty.js 25 | sourceReference : 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/sources/sources-allows-shebang-in-node-code.txt: -------------------------------------------------------------------------------- 1 | { 2 | reason : new 3 | source : { 4 | name : ${fixturesDir}/shebang-lf 5 | path : ${fixturesDir}/shebang-lf 6 | sourceReference : 0 7 | } 8 | } 9 | { 10 | reason : new 11 | source : { 12 | name : ${fixturesDir}/shebang-crlf 13 | path : ${fixturesDir}/shebang-crlf 14 | sourceReference : 0 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/sources/sources-applies-sourcemap-path-mappings-to-sourceurls-vscode204784.txt: -------------------------------------------------------------------------------- 1 | { 2 | reason : new 3 | source : { 4 | name : vscode-204784/src/original.js 5 | path : ${workspaceFolder}/web/vscode-204784/src/original.js 6 | sourceReference : 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/test/sources/sources-removes-any-query-from-node-paths-529.txt: -------------------------------------------------------------------------------- 1 | { 2 | reason : new 3 | source : { 4 | name : simpleNode/simpleWebpackWithQuery.ts 5 | path : ${workspaceFolder}/simpleNode/simpleWebpackWithQuery.ts 6 | sourceReference : 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/test/sources/sources-sourcemap-error-handling-logs-initial-parse-errors.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: //# sourceMappingURL=data:application/json;charset=utf-8;base64,ZGV2cw== 2 | 3 | stderr> Could not read source map for http://localhost:8001/eval1.js: Unexpected token 'd', "devs" is not valid JSON 4 | -------------------------------------------------------------------------------- /src/test/sources/sources-sourcemap-error-handling-logs-not-found-errors.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: //# sourceMappingURL=does-not-exist.js.map 2 | 3 | stderr> Could not read source map for http://localhost:8001/eval1.js: Unexpected 404 response from http://localhost:8001/does-not-exist.js.map: 4 | 5 | 6 | 7 | Error 8 | 9 | 10 |
Cannot GET /does-not-exist.js.map
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/test/sources/sources-supports-nested-sourcemaps-1390.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | Module.add @ ${workspaceFolder}/nestedSourceMaps/b/lib.js:2:1 8 | -------------------------------------------------------------------------------- /src/test/sources/sources-updated-content.txt: -------------------------------------------------------------------------------- 1 | 2 | Source event for test.js 3 | { 4 | reason : new 5 | source : { 6 | name : localhost꞉8001/test.js 7 | path : localhost꞉8001/test.js 8 | sourceReference : 9 | } 10 | } 11 | content1//# sourceURL=test.js 12 | --------- 13 | 14 | Source event for test.js updated 15 | { 16 | reason : new 17 | source : { 18 | name : localhost꞉8001/test.js 19 | path : localhost꞉8001/test.js 20 | sourceReference : 21 | } 22 | } 23 | content2//# sourceURL=test.js 24 | --------- 25 | 26 | Loaded sources: { 27 | sources : [ 28 | [0] : { 29 | name : localhost꞉8001/test.js 30 | path : localhost꞉8001/test.js 31 | sourceReference : 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /src/test/sources/sources-waiting-for-source-map-failure.txt: -------------------------------------------------------------------------------- 1 | stderr> Uncaught Error: error2 2 | stderr> > Uncaught Error: error2 3 | stderr> 4 | throwError @ ${workspaceFolder}/web/browserify/bundle.js:23:11 5 | @ /VM:1:27 6 | ◀ setTimeout ▶ 7 | @ /VM:1 8 | -------------------------------------------------------------------------------- /src/test/sources/sources-waiting-for-source-map.txt: -------------------------------------------------------------------------------- 1 | stderr> Uncaught Error Error: error2 2 | at throwError (${workspaceFolder}/web/browserify/module1.ts:6:9) 3 | at (/VM:1:27) 4 | --- setTimeout --- 5 | at (/VM:1:1) 6 | stderr> 7 | > Uncaught Error Error: error2 8 | at throwError (${workspaceFolder}/web/browserify/module1.ts:6:9) 9 | at (/VM:1:27) 10 | --- setTimeout --- 11 | at (/VM:1:1) 12 | stderr> 13 | throwError @ ${workspaceFolder}/web/browserify/module1.ts:6:9 14 | @ /VM:1:27 15 | ◀ setTimeout ▶ 16 | @ /VM:1 17 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-anonymous-initial-script.txt: -------------------------------------------------------------------------------- 1 | @ /VM:1:9 2 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-anonymous-scopes.txt: -------------------------------------------------------------------------------- 1 | 2 | Window.paused @ /VM:4:9 3 | > scope #0: Local: paused 4 | > this: Window 5 | y: 'paused' 6 | scope #1: Global [expensive] 7 | 8 | Window.chained @ /VM:11:23 9 | > scope #0: Local: chained 10 | > this: Window 11 | x: 'x1' 12 | > scope #1: Closure (chain) 13 | n: 1 14 | scope #2: Global [expensive] 15 | 16 | Window.chained @ /VM:11:23 17 | > scope #0: Local: chained 18 | > this: Window 19 | x: 'x2' 20 | > scope #1: Closure (chain) 21 | n: 2 22 | scope #2: Global [expensive] 23 | 24 | Window.chained @ /VM:11:23 25 | > scope #0: Local: chained 26 | > this: Window 27 | x: 'x3' 28 | > scope #1: Closure (chain) 29 | n: 3 30 | scope #2: Global [expensive] 31 | 32 | @ /VM:14:15 33 | scope #0: Global [expensive] 34 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-async-disables.txt: -------------------------------------------------------------------------------- 1 | 2 | Window.foo @ /VM:4:11 3 | > scope #0: Local: foo 4 | n: 0 5 | > this: Window 6 | scope #1: Global [expensive] 7 | 8 | Window.bar @ /VM:13:15 9 | > scope #0: Local: bar 10 | n: 0 11 | > this: Window 12 | scope #1: Global [expensive] 13 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-async.txt: -------------------------------------------------------------------------------- 1 | 2 | Window.foo @ /VM:4:11 3 | > scope #0: Local: foo 4 | n: 0 5 | > this: Window 6 | scope #1: Global [expensive] 7 | 8 | Window.bar @ /VM:13:15 9 | > scope #0: Local: bar 10 | n: 0 11 | > this: Window 12 | scope #1: Global [expensive] 13 | 14 | ----await---- 15 | @ /VM:8:11 16 | scope error: Variables not available in async stacks 17 | ----setTimeout---- 18 | foo @ /VM:7:9 19 | scope error: Variables not available in async stacks 20 | bar @ /VM:13:15 21 | scope error: Variables not available in async stacks 22 | ----await---- 23 | @ /VM:15:7 24 | scope error: Variables not available in async stacks 25 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-cross-target.txt: -------------------------------------------------------------------------------- 1 | 2 | @ ${workspaceFolder}/web/worker.html:6:5 3 | > scope #0: Local 4 | > e: MessageEvent {isTrusted: true, data: 'pause', origin: '', lastEventId: '', source: null, …} 5 | this: undefined 6 | scope #1: Global [expensive] 7 | 8 | ----postMessage---- 9 | @ ${workspaceFolder}/web/worker.js:6:5 10 | scope error: Variables not available in async stacks 11 | ----Worker.postMessage---- 12 | @ /VM:1:10 13 | scope error: Variables not available in async stacks 14 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-eval-in-anonymous.txt: -------------------------------------------------------------------------------- 1 | @ eval.js:3:1 2 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-return-value.txt: -------------------------------------------------------------------------------- 1 | 2 | Window.foo @ /VM:4:19 3 | > scope #0: Local: foo 4 | Return value: 42 5 | > this: Window 6 | scope #1: Global [expensive] 7 | 8 | @ /VM:6:7 9 | scope #0: Global [expensive] 10 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-handles-special-chars-in-stack-203408.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${fixturesDir}/test.js:1:74 8 | exports.foo @ ${fixturesDir}/nested/a.js:1:23 9 | @ ${fixturesDir}/test.js:1:62 10 | exports.foo @ ${fixturesDir}/@nested/a.js:1:23 11 | @ ${fixturesDir}/test.js:1:27 12 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-multiple-authored-ts-to-js.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ /VM:1:25 8 | Window.bar @ ${workspaceFolder}/web/browserify/module2.ts:3:3 9 | @ /VM:1:8 10 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-single-authored-js.txt: -------------------------------------------------------------------------------- 1 | Window.bar @ ${workspaceFolder}/web/script.js:6:3 2 | Window.foo @ ${workspaceFolder}/web/script.js:2:3 3 | @ ${workspaceFolder}/web/script.js:9:1 4 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-single-compiled-js.txt: -------------------------------------------------------------------------------- 1 | plusTwo @ ${workspaceFolder}/web/basic.js:3:5 2 | printArr @ ${workspaceFolder}/web/basic.js:7:21 3 | abcdef @ ${workspaceFolder}/web/basic.js:17:5 4 | @ ${workspaceFolder}/web/basic.js:19:1 5 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-toggle-authored-ts.txt: -------------------------------------------------------------------------------- 1 | @ ${workspaceFolder}/web/basic.ts:21:1 2 | ----send toggle skipfile status request---- 3 | @ ${workspaceFolder}/web/basic.ts:21:1 4 | ----send (un)toggle skipfile status request---- 5 | @ ${workspaceFolder}/web/basic.ts:21:1 6 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-skipfiles-works-with-absolute-paths-470.txt: -------------------------------------------------------------------------------- 1 | plusTwo @ ${workspaceFolder}/web/basic.js:3:5 2 | printArr @ ${workspaceFolder}/web/basic.js:7:21 3 | abcdef @ ${workspaceFolder}/web/basic.js:17:5 4 | @ ${workspaceFolder}/web/basic.js:19:1 5 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep-does-not-smart-step-manual-breakpoints.txt: -------------------------------------------------------------------------------- 1 | foo @ ${workspaceFolder}/web/smartStep/exceptionBp.js:9:3 2 | bar @ ${workspaceFolder}/web/smartStep/exceptionBp.js:3:5 3 | @ ${workspaceFolder}/web/smartStep/exceptionBp.js:5:1 4 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep-does-not-smart-step-on-exception-breakpoints.txt: -------------------------------------------------------------------------------- 1 | foo @ ${workspaceFolder}/web/smartStep/exceptionBp.js:9:3 2 | bar @ ${workspaceFolder}/web/smartStep/exceptionBp.ts:4:3 3 | @ ${workspaceFolder}/web/smartStep/exceptionBp.ts:7:1 4 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep-does-not-step-in-sources-missing-maps.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: debugger; doCallback(() => { 2 | console.log("hi"); 3 | }); 4 | { 5 | allThreadsStopped : false 6 | description : Paused 7 | reason : step 8 | threadId : 9 | } 10 | Window.doCallback @ ${workspaceFolder}/web/smartStep/missingMap.js:2:5 11 | @ localhost꞉8001/eval1.js:1:11 12 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep-remembers-step-direction-in.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: doCall(() => { mapped1(); mapped2(); }) 2 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlLnRzIl0sIm1hcHBpbmdzIjoiIn0= 3 | mapped1 @ ${workspaceFolder}/web/smartStep/directional.ts:2:3 4 | @ localhost꞉8001/eval1.js:1:16 5 | doCall @ ${workspaceFolder}/web/smartStep/directional.ts:10:3 6 | @ localhost꞉8001/eval1.js:1:1 7 | 8 | # stepping in 9 | mapped2 @ ${workspaceFolder}/web/smartStep/directional.ts:6:3 10 | @ localhost꞉8001/eval1.js:1:27 11 | doCall @ ${workspaceFolder}/web/smartStep/directional.ts:10:3 12 | @ localhost꞉8001/eval1.js:1:1 13 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep-remembers-step-direction-out.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: doCall(() => { mapped1(); mapped2(); }) 2 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlLnRzIl0sIm1hcHBpbmdzIjoiIn0= 3 | mapped1 @ ${workspaceFolder}/web/smartStep/directional.ts:2:3 4 | @ localhost꞉8001/eval1.js:1:16 5 | doCall @ ${workspaceFolder}/web/smartStep/directional.ts:10:3 6 | @ localhost꞉8001/eval1.js:1:1 7 | 8 | # stepping out 9 | doCall @ ${workspaceFolder}/web/smartStep/directional.ts:11:1 10 | @ localhost꞉8001/eval1.js:1:1 11 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-smartstep.txt: -------------------------------------------------------------------------------- 1 | @ ${workspaceFolder}/web/async-ts/test.ts:8:13 2 | @ ${workspaceFolder}/web/async-ts/test.js:7:71 3 | __awaiter @ ${workspaceFolder}/web/async-ts/test.js:3:12 4 | main @ ${workspaceFolder}/web/async-ts/test.js:17:12 5 | @ ${workspaceFolder}/web/async-ts/test.ts:11:1 6 | @ ${workspaceFolder}/web/async-ts/test.ts:2:11 7 | @ ${workspaceFolder}/web/async-ts/test.js:7:71 8 | __awaiter @ ${workspaceFolder}/web/async-ts/test.js:3:12 9 | foo @ ${workspaceFolder}/web/async-ts/test.js:11:12 10 | @ ${workspaceFolder}/web/async-ts/test.ts:8:19 11 | @ ${workspaceFolder}/web/async-ts/test.js:7:71 12 | __awaiter @ ${workspaceFolder}/web/async-ts/test.js:3:12 13 | main @ ${workspaceFolder}/web/async-ts/test.js:17:12 14 | @ ${workspaceFolder}/web/async-ts/test.ts:11:1 15 | -------------------------------------------------------------------------------- /src/test/stacks/stacks-uses-custom-descriptions-in-frame-names.txt: -------------------------------------------------------------------------------- 1 | Custom.method2 @ /VM:4:13 2 | Foo.method1 @ /VM:14:30 3 | @ /VM:18:19 4 | -------------------------------------------------------------------------------- /src/test/testHooks.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import 'reflect-metadata'; 6 | import { use } from 'chai'; 7 | 8 | use(require('chai-subset')); 9 | use(require('chai-as-promised')); 10 | -------------------------------------------------------------------------------- /src/test/testMemento.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { Memento } from 'vscode'; 6 | 7 | export class TestMemento implements Memento { 8 | private readonly data = new Map(); 9 | 10 | keys(): readonly string[] { 11 | return [...this.data.keys()]; 12 | } 13 | 14 | get(key: string): T | undefined; 15 | get(key: string, defaultValue: T): T; 16 | get(key: any, defaultValue?: any): T | T | undefined { 17 | return this.data.has(key) ? this.data.get(key) : defaultValue; 18 | } 19 | 20 | update(key: string, value: any): Thenable { 21 | this.data.set(key, value); 22 | return Promise.resolve(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/threads/threads-not-paused.txt: -------------------------------------------------------------------------------- 1 | { 2 | threads : [ 3 | [0] : { 4 | id : 5 | name : localhost:8001/index.html 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /src/test/threads/threads-pause-on-exceptions-configuration.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on exception 4 | reason : exception 5 | threadId : 6 | } 7 | { 8 | breakMode : all 9 | details : { 10 | stackTrace : at :7:17 11 | } 12 | exceptionId : Error: this error is uncaught 13 | } 14 | { 15 | allThreadsContinued : false 16 | } 17 | -------------------------------------------------------------------------------- /src/test/threads/threads-pause-on-exceptions-deals-with-syntax-errors-in-conditional-exception-bps.txt: -------------------------------------------------------------------------------- 1 | stderr> Syntax error setting breakpoint with condition "!!(error.message.includes(\"bye)" on line 0: Invalid or unexpected token 2 | -------------------------------------------------------------------------------- /src/test/threads/threads-pause-on-exceptions-does-not-pause-on-exceptions-in-internals.txt: -------------------------------------------------------------------------------- 1 | Evaluating#1: console.log({ [Symbol.for('debug.description')]() { throw 'oops'; } }) 2 | -------------------------------------------------------------------------------- /src/test/threads/threads-paused.txt: -------------------------------------------------------------------------------- 1 | { 2 | threads : [ 3 | [0] : { 4 | id : 5 | name : localhost:8001/index.html 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /src/test/threads/threadsTest-startup-tests-events.txt: -------------------------------------------------------------------------------- 1 | Initializing 2 | Launching 3 | Thread started: { 4 | reason : started 5 | threadId : 6 | } 7 | Requesting threads: { 8 | threads : [ 9 | [0] : { 10 | id : 11 | name : 📄 blank 12 | } 13 | ] 14 | } 15 | Launched 16 | Requesting threads: { 17 | threads : [ 18 | [0] : { 19 | id : 20 | name : 📄 blank 21 | } 22 | ] 23 | } 24 | Disconnecting 25 | Thread exited: { 26 | reason : exited 27 | threadId : 28 | } 29 | -------------------------------------------------------------------------------- /src/test/variables/variables-basic-basic-object.txt: -------------------------------------------------------------------------------- 1 | > result: {a: 1} 2 | a: 1 3 | > [[Prototype]]: Object 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-basic-clear-console.txt: -------------------------------------------------------------------------------- 1 | stdout> Hello world 2 | console>  3 | stdout> Hello world 4 | console>  5 | -------------------------------------------------------------------------------- /src/test/variables/variables-basic-simple-log.txt: -------------------------------------------------------------------------------- 1 | stdout> Hello world 2 | -------------------------------------------------------------------------------- /src/test/variables/variables-map-variable-without-preview-1824.txt: -------------------------------------------------------------------------------- 1 | > result: A {#bar: Map(1)} 2 | > #bar: Map(1) 3 | > [[Prototype]]: Object 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-multiple-threads-worker.txt: -------------------------------------------------------------------------------- 1 | stderr> {foo: {…}} 2 | stderr> > {foo: {…}} 3 | stderr> > arg0: {foo: {…}} 4 | stderr> 5 | @ ${workspaceFolder}/web/worker.html:4:11 6 | ◀ postMessage ▶ 7 | @ ${workspaceFolder}/web/worker.js:10:5 8 | ◀ Worker.postMessage ▶ 9 | @ ${workspaceFolder}/web/worker.html:8:10 10 | stderr> {foo: {…}} 11 | stderr> > {foo: {…}} 12 | stderr> > arg0: {foo: {…}} 13 | stderr> 14 | @ ${workspaceFolder}/web/worker.js:1:9 15 | ◀ Worker Created ▶ 16 | @ ${workspaceFolder}/web/worker.html:2:12 17 | stderr> {foo: {…}} 18 | stderr> > {foo: {…}} 19 | stderr> > arg0: {foo: {…}} 20 | stderr> 21 | @ ${workspaceFolder}/web/worker.js:4:11 22 | ◀ Worker.postMessage ▶ 23 | @ ${workspaceFolder}/web/worker.html:8:10 24 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-customdescriptiongenerator-shows-errors.txt: -------------------------------------------------------------------------------- 1 | > result: Error: oh no! (couldn't describe: object) 2 | > getter: (...) 3 | > [[Prototype]]: Foo 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-customdescriptiongenerator-using-function-declaration.txt: -------------------------------------------------------------------------------- 1 | > result: using function: Instance of bar 2 | > getter: (...) 3 | > [[Prototype]]: Foo 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-customdescriptiongenerator-using-statement-syntax.txt: -------------------------------------------------------------------------------- 1 | > result: using statement: Instance of bar 2 | > getter: (...) 3 | > [[Prototype]]: Foo 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-customdescriptiongenerator-using-statement-with-return-syntax.txt: -------------------------------------------------------------------------------- 1 | > result: using statement return: Instance of bar 2 | > getter: (...) 3 | > [[Prototype]]: Foo 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-customdescriptiongenerator-with-arrays.txt: -------------------------------------------------------------------------------- 1 | > result: (4) [Bar, Foo, 5, 'test'] 2 | > 0: Instance of bar 3 | > 1: Foo 4 | 2: 5 5 | 3: 'test' 6 | length: 4 7 | > [[Prototype]]: Array(0) 8 | > [[Prototype]]: Object 9 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-custompropertiesgenerator-works-with-custompropertiesgenerator-method.txt: -------------------------------------------------------------------------------- 1 | > result: Bar {realProp: 'cc3'} 2 | customProp1: 'aa1' 3 | customProp2: 'bb2' 4 | > getter: (...) 5 | realProp: 'cc3' 6 | > [[Prototype]]: Foo 7 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-deep-accessor.txt: -------------------------------------------------------------------------------- 1 | > result: Bar 2 | > getter: (...) 3 | > [[Prototype]]: Foo 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-get-set.txt: -------------------------------------------------------------------------------- 1 | > result: {getter: , accessor: } 2 | > accessor: (...) 3 | > getter: (...) 4 | > setter: write-only 5 | > [[Prototype]]: Object 6 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-private-props.txt: -------------------------------------------------------------------------------- 1 | > result: A {#foo: 'bar'} 2 | #foo: 'bar' 3 | > [[Prototype]]: Object 4 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-shows-errors-while-generating-properties.txt: -------------------------------------------------------------------------------- 1 | > result: Bar {realProp: 'cc3'} 2 | 3 | Error: Some error while generating properties 4 | at Bar. (:3:47) 5 | at Bar._generatedCode (:4:6) 6 | > getter: (...) 7 | realProp: 'cc3' 8 | > [[Prototype]]: Foo 9 | -------------------------------------------------------------------------------- /src/test/variables/variables-object-simple-array.txt: -------------------------------------------------------------------------------- 1 | > result: (3) [1, 2, 3, foo: 1] // type=Array 2 | 0: 1 // type=number 3 | 1: 2 // type=number 4 | 2: 3 // type=number 5 | foo: 1 // type=number 6 | length: 3 // type=number 7 | > [[Prototype]]: Array(0) // type=Array 8 | > [[Prototype]]: Object // type=Object 9 | -------------------------------------------------------------------------------- /src/test/variables/variables-setvariable-basic.txt: -------------------------------------------------------------------------------- 1 | > result: {foo: 42} 2 | foo: 42 3 | > [[Prototype]]: Object 4 | 5 | Setting "foo" to "{bar: 17}" 6 | > : Object 7 | bar: 17 8 | > [[Prototype]]: Object 9 | 10 | Original 11 | > result: {foo: 42} 12 | > foo: {bar: 17} 13 | > [[Prototype]]: Object 14 | 15 | setVariable failure: ReferenceError: baz is not defined 16 | -------------------------------------------------------------------------------- /src/test/variables/variables-setvariable-evaluatename.txt: -------------------------------------------------------------------------------- 1 | stopped: { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | undefined 8 | a 9 | b 10 | b[0] 11 | b[1] 12 | b[2] 13 | b[3] 14 | b.prop 15 | b.length 16 | b["[[Prototype]]"] 17 | b["[[Prototype]]"] 18 | c 19 | c._b 20 | c.$a 21 | c[42] 22 | c.c 23 | c["d d"] 24 | c.e 25 | c.e.nested 26 | c.e.nested[0] 27 | c.e.nested[0].obj 28 | c.e.nested[0]["[[Prototype]]"] 29 | c.e.nested.length 30 | c.e.nested["[[Prototype]]"] 31 | c.e.nested["[[Prototype]]"] 32 | c.e["[[Prototype]]"] 33 | c["Symbol(wut)"] 34 | c["[[Prototype]]"] 35 | this 36 | -------------------------------------------------------------------------------- /src/test/variables/variables-setvariable-name-mapping.txt: -------------------------------------------------------------------------------- 1 | 2 | Window.c @ ${workspaceFolder}/web/minified/index.js:13:5 3 | > scope #0: Local: c 4 | arg1: 2 5 | arg2: 3 6 | > this: Window 7 | scope #1: Global [expensive] 8 | 9 | Window.test @ ${workspaceFolder}/web/minified/index.js:6:5 10 | > scope #0: Block: test 11 | inner1: 2 12 | inner2: 3 13 | > this: Window 14 | > scope #1: Local: test 15 | > hitDebugger: ƒ c(n,t){debugger} 16 | inner1: 1 17 | scope #2: Global [expensive] 18 | 19 | @ /VM:1:1 20 | scope #0: Global [expensive] 21 | 22 | Preserves eval sourceURL (#1259): 23 | Uncaught ReferenceError ReferenceError: thenSomethingInvalid is not defined 24 | at eval (repl:2:1) 25 | 26 | -------------------------------------------------------------------------------- /src/test/variables/variables-setvariable-scope.txt: -------------------------------------------------------------------------------- 1 | stopped: { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | > scope: Local: foo 8 | > this: Window 9 | y: 'value of y' 10 | z: 'value of z' 11 | 12 | Setting "y" to "z" 13 | : 'value of z' 14 | 15 | Original 16 | > scope: Local: foo 17 | > this: Window 18 | y: 'value of y' 19 | z: 'value of z' 20 | -------------------------------------------------------------------------------- /src/test/variables/variables-setvariable-setexpression.txt: -------------------------------------------------------------------------------- 1 | 2 | setExpression a: { 3 | type : number 4 | value : 42 5 | variablesReference : 6 | } 7 | 8 | setExpression a: { 9 | type : string 10 | value : 'hello world' 11 | variablesReference : 12 | } 13 | 14 | Vars: 15 | stdout> 42 hello world 16 | -------------------------------------------------------------------------------- /src/test/variables/variables-web-tags.txt: -------------------------------------------------------------------------------- 1 | > result: HTMLCollection(2) [meta, title, foo: meta] 2 | > 0:  3 | > 1: ... 4 | > length: (...) 5 | > foo:  6 | > [[Prototype]]: HTMLCollection 7 | > [[Prototype]]: Object 8 | -------------------------------------------------------------------------------- /src/test/wasm/webassembly-dwarf-does-lldb-evaluation-for-structs.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | > result: data_t * 8 | > 0x10408: data_t 9 | > id: char[12] 10 | 0: 'H' 11 | 1: 'e' 12 | 2: 'l' 13 | 3: 'l' 14 | 4: 'o' 15 | 5: ' ' 16 | 6: 'w' 17 | 7: 'o' 18 | 8: 'r' 19 | 9: 'l' 20 | 10: 'd' 21 | 11: '\0' 22 | x: 12 23 | y: 34 24 | -------------------------------------------------------------------------------- /src/test/wasm/webassembly-dwarf-does-lldb-evaluation.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on breakpoint 4 | reason : breakpoint 5 | threadId : 6 | } 7 | result: 9 8 | result: 0 9 | result: 18 10 | -------------------------------------------------------------------------------- /src/test/webview/webview-breakpoints-launched-script.txt: -------------------------------------------------------------------------------- 1 | { 2 | allThreadsStopped : false 3 | description : Paused on debugger statement 4 | reason : pause 5 | threadId : 6 | } 7 | @ ${workspaceFolder}/web/script.js:10:1 8 | { 9 | allThreadsStopped : false 10 | description : Paused on breakpoint 11 | reason : breakpoint 12 | threadId : 13 | } 14 | bar @ ${workspaceFolder}/web/script.js:6:3 15 | foo @ ${workspaceFolder}/web/script.js:2:3 16 | @ ${workspaceFolder}/web/script.js:11:1 17 | -------------------------------------------------------------------------------- /src/typings/acorn-loose.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | declare module 'acorn-loose' { 6 | import acorn from 'acorn'; 7 | import { Node } from 'estree'; 8 | 9 | export function isDummy(node: acorn.Node | Node): boolean; 10 | 11 | export = acorn; 12 | } 13 | -------------------------------------------------------------------------------- /src/typings/json.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.json'; 2 | -------------------------------------------------------------------------------- /src/typings/object.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | // Improve the default typing of Object.keys(o: T) to be keyof T (without the symbols) 6 | 7 | interface ObjectConstructor { 8 | keys(o: T): WithoutSymbols[]; 9 | fromEntries(map: ReadonlyMap): { [key: string]: V }; 10 | } 11 | 12 | // eslint-disable-next-line 13 | declare var Object: ObjectConstructor; 14 | 15 | /** Return the strings that form S and ignore the symbols */ 16 | type WithoutSymbols = S extends string ? S : never; 17 | -------------------------------------------------------------------------------- /src/typings/typedArrays.d.ts: -------------------------------------------------------------------------------- 1 | type TypedArray = 2 | | Uint8Array 3 | | Uint8ClampedArray 4 | | Uint16Array 5 | | Uint32Array 6 | | BigUint64Array 7 | | Int8Array 8 | | Int32Array 9 | | BigInt64Array 10 | | Float32Array 11 | | Float64Array; 12 | 13 | interface TypedArrayConstructor { 14 | new(): TypedArray; 15 | new(values: ArrayBuffer): TypedArray; 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/basic-wat.configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": ";;", 4 | "blockComment": ["(; ", " ;)"] 5 | }, 6 | "brackets": [ 7 | ["(", ")"] 8 | ], 9 | "autoClosingPairs": [ 10 | { "open": "(", "close": ")" }, 11 | { "open": "\"", "close": "\"" } 12 | ], 13 | "surroundingPairs": [ 14 | { "open": "(", "close": ")" }, 15 | { "open": "\"", "close": "\"" } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /src/ui/linkedBreakpointLocation.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | /** 6 | * Interface that can warn the user if a breakpoint is in a symlinked location 7 | * without an obvious preservation flag. 8 | */ 9 | export interface ILinkedBreakpointLocation { 10 | warn(): void; 11 | } 12 | 13 | export const ILinkedBreakpointLocation = Symbol('ILinkedBreakpointLocation'); 14 | -------------------------------------------------------------------------------- /src/ui/managedContextKey.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as vscode from 'vscode'; 6 | import { ContextKey, IContextKeyTypes } from '../common/contributionUtils'; 7 | 8 | export class ManagedContextKey { 9 | private _value: IContextKeyTypes[T] | undefined; 10 | 11 | public set value(value: IContextKeyTypes[T] | undefined) { 12 | if (value !== this._value) { 13 | this._value = value; 14 | vscode.commands.executeCommand('setContext', this.key, value); 15 | } 16 | } 17 | 18 | public get value() { 19 | return this._value; 20 | } 21 | 22 | constructor(private readonly key: T) {} 23 | } 24 | -------------------------------------------------------------------------------- /src/ui/managedState.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as vscode from 'vscode'; 6 | 7 | const Uninitialized = Symbol('Uninitialized'); 8 | 9 | export class ManagedState { 10 | private _value: T | typeof Uninitialized = Uninitialized; 11 | 12 | public write(memento: vscode.Memento, value: T) { 13 | if (value !== this.read(memento)) { 14 | this._value = value; 15 | memento.update(this.key, value); 16 | } 17 | } 18 | 19 | public read(memento: vscode.Memento) { 20 | if (this._value === Uninitialized) { 21 | this._value = memento.get(this.key) ?? this.defaultValue; 22 | } 23 | 24 | return this._value; 25 | } 26 | 27 | constructor(private readonly key: string, private readonly defaultValue: T) {} 28 | } 29 | -------------------------------------------------------------------------------- /src/ui/revealPage.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import * as vscode from 'vscode'; 6 | import { Commands, registerCommand } from '../common/contributionUtils'; 7 | import { DebugSessionTracker } from './debugSessionTracker'; 8 | 9 | export const registerRevealPage = ( 10 | context: vscode.ExtensionContext, 11 | tracker: DebugSessionTracker, 12 | ) => { 13 | context.subscriptions.push( 14 | registerCommand(vscode.commands, Commands.RevealPage, async sessionId => { 15 | const session = tracker.getById(sessionId); 16 | await session?.customRequest('revealPage'); 17 | }), 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /src/ui/ui-ioc.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | 5 | import { Container } from 'inversify'; 6 | 7 | export const registerUiComponents = (_container: Container) => { 8 | // no-op function that's loaded in standalone debug servers 9 | }; 10 | 11 | export const registerTopLevelSessionComponents = (_container: Container) => { 12 | // no-op function that's loaded in standalone debug servers 13 | }; 14 | -------------------------------------------------------------------------------- /testWorkspace/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.git": true, 4 | "**/.svn": true, 5 | "**/.hg": true, 6 | "**/CVS": true, 7 | "**/.DS_Store": true, 8 | "**/Thumbs.db": true, 9 | "**/obj": true 10 | }, 11 | "hide-files.files": [], 12 | "livePreview.defaultPreviewPath": "/web/basic.html" 13 | } -------------------------------------------------------------------------------- /testWorkspace/babelLineNumbers/app.tsx: -------------------------------------------------------------------------------- 1 | export default function App() { 2 | console.log('greetings!'); 3 | return 'hello world'; 4 | } 5 | -------------------------------------------------------------------------------- /testWorkspace/babelLineNumbers/columns-test.txt: -------------------------------------------------------------------------------- 1 | Sit 2 | culpa ea 3 | 4 | exercitation qui qui 5 | 6 | fugiat velit reprehenderit 7 | officia 8 | ipsum 9 | ex 10 | laboris 11 | proident 12 | ipsum. 13 | -------------------------------------------------------------------------------- /testWorkspace/babelLineNumbers/index.tsx: -------------------------------------------------------------------------------- 1 | import App from "./app"; 2 | 3 | App(); 4 | -------------------------------------------------------------------------------- /testWorkspace/chakracore/ChakraCore.Debugger.Sample.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/chakracore/ChakraCore.Debugger.Sample.exe -------------------------------------------------------------------------------- /testWorkspace/chakracore/ChakraCore.Debugger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/chakracore/ChakraCore.Debugger.dll -------------------------------------------------------------------------------- /testWorkspace/chakracore/ChakraCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/chakracore/ChakraCore.dll -------------------------------------------------------------------------------- /testWorkspace/customDebuggerDescriptions/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "pwa-node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "trace": true, 15 | "program": "${workspaceFolder}\\app.ts", 16 | "outFiles": [ 17 | "${workspaceFolder}/**/*.js" 18 | ], 19 | "customDescriptionGenerator": "const lal = 4; lal + global.customDebuggerDescription(this, defaultValue)", 20 | "customPropertiesGeneratorr": "function () { returncustomPropertiesGenerators(this); }", 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /testWorkspace/customDebuggerDescriptions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": ".", 6 | "lib": [ 7 | "dom" 8 | ], 9 | "sourceMap": true, 10 | "rootDir": ".", 11 | "strict": true /* enable all strict type-checking options */ 12 | /* Additional Checks */ 13 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 14 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 15 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 16 | }, 17 | "files": ["app.ts"] 18 | } 19 | 20 | -------------------------------------------------------------------------------- /testWorkspace/glob(chars)/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | console.log("Line 1"); 3 | console.log("Line 2"); 4 | console.log("Line 3"); 5 | console.log("Line 4"); 6 | console.log("Line 5"); 7 | console.log("Line 6"); 8 | console.log("Line 7"); 9 | console.log("Line 8"); 10 | //# sourceMappingURL=app.js.map -------------------------------------------------------------------------------- /testWorkspace/glob(chars)/app.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC"} -------------------------------------------------------------------------------- /testWorkspace/glob(chars)/app.ts: -------------------------------------------------------------------------------- 1 | console.log("Line 1"); 2 | console.log("Line 2"); 3 | console.log("Line 3"); 4 | console.log("Line 4"); 5 | console.log("Line 5"); 6 | console.log("Line 6"); 7 | console.log("Line 7"); 8 | console.log("Line 8"); 9 | -------------------------------------------------------------------------------- /testWorkspace/hashTestCases/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testWorkspace/hashTestCases/simple.js: -------------------------------------------------------------------------------- 1 | function add(a, b) { return a + b } 2 | -------------------------------------------------------------------------------- /testWorkspace/hashTestCases/utf16be.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/hashTestCases/utf16be.js -------------------------------------------------------------------------------- /testWorkspace/hashTestCases/utf16le.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/hashTestCases/utf16le.js -------------------------------------------------------------------------------- /testWorkspace/hashTestCases/utf8-bom.js: -------------------------------------------------------------------------------- 1 | function add(a, b) { return a + b } 2 | -------------------------------------------------------------------------------- /testWorkspace/moduleWrapper/customWrapper.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const extension = '.js'; 3 | const previous = require.extensions[extension]; 4 | 5 | require.extensions[extension] = (module, fname) => { 6 | const contents = fs.readFileSync(fname, 'utf8'); 7 | const wrapped = `(function (myCustomWrapper) { ${contents}\n});`; 8 | module._compile(wrapped, fname); 9 | }; 10 | 11 | require('./test'); 12 | debugger; // make sure it runs long enough for us to get the event :P 13 | -------------------------------------------------------------------------------- /testWorkspace/moduleWrapper/index.js: -------------------------------------------------------------------------------- 1 | // Hook into Node's require to add the module wrapper code. Normally we don't 2 | // see this in the debugger, but some environments like Electron seem to 3 | // include it, so this lets us have a test case for it. 4 | // https://nodejs.org/api/modules.html#modules_the_module_wrapper 5 | const fs = require('fs'); 6 | const extension = '.js'; 7 | const previous = require.extensions[extension]; 8 | 9 | require.extensions[extension] = (module, fname) => { 10 | const contents = fs.readFileSync(fname, 'utf8'); 11 | const wrapped = `(function (exports, require, module, __filename, __dirname) { ${contents}\n});`; 12 | module._compile(wrapped, fname); 13 | }; 14 | 15 | require('./test'); 16 | debugger; // make sure it runs long enough for us to get the event :P 17 | -------------------------------------------------------------------------------- /testWorkspace/moduleWrapper/test.js: -------------------------------------------------------------------------------- 1 | console.log('Hello world!'); 2 | -------------------------------------------------------------------------------- /testWorkspace/nestedAbsRoot/index.js: -------------------------------------------------------------------------------- 1 | const compiled = 2 | `"use strict"; 3 | 4 | console.log('hello world'); 5 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,` + 6 | Buffer.from( 7 | JSON.stringify({ 8 | version: 3, 9 | sources: ['test.js'], 10 | names: ['console', 'log'], 11 | mappings: ';;AAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ', 12 | sourceRoot: __dirname, 13 | sourcesContent: ["console.log('hello world');\n"], 14 | }), 15 | ).toString('base64'); 16 | 17 | const fs = require('fs'); 18 | const path = require('path'); 19 | const extension = '.js'; 20 | const previous = require.extensions[extension]; 21 | 22 | require.extensions[extension] = (module, fname) => { 23 | module._compile( 24 | fname === path.join(__dirname, 'test.js') ? compiled : fs.readFileSync(fname, 'utf8'), 25 | fname, 26 | ); 27 | }; 28 | 29 | require('./test'); 30 | -------------------------------------------------------------------------------- /testWorkspace/nestedAbsRoot/test.js: -------------------------------------------------------------------------------- 1 | console.log('hello world'); 2 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/a/main.js: -------------------------------------------------------------------------------- 1 | import * as lib from '../b/lib.bundle.js'; 2 | 3 | console.log('addition', lib.add(1, 2)); 4 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/a/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: path.join(__dirname, 'main.js'), 5 | mode: 'development', 6 | devtool: 'inline-source-map', 7 | output: { 8 | path: __dirname, 9 | filename: 'main.bundle.js', 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/b/lib.js: -------------------------------------------------------------------------------- 1 | export function add(a, b) { 2 | return a + b; 3 | } 4 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/b/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: path.join(__dirname, 'lib.js'), 5 | mode: 'development', 6 | devtool: 'inline-source-map', 7 | output: { 8 | path: __dirname, 9 | filename: 'lib.bundle.js', 10 | library: { type: 'module' }, 11 | }, 12 | experiments: { 13 | outputModule: true, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /testWorkspace/nestedSourceMaps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "webpack -c b/webpack.config.js && webpack -c a/webpack.config.js" 4 | }, 5 | "dependencies": { 6 | "webpack": "^5.74.0", 7 | "webpack-cli": "^4.10.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/index.js: -------------------------------------------------------------------------------- 1 | const { double } = require(process.env.MODULE); 2 | 3 | console.log(double(21)); 4 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodeModuleBreakpoint/node_modules/.DS_Store -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/absolute-sourceroot/out/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | function double(n) { 4 | return n * 2; 5 | } 6 | exports.double = double; 7 | //# sourceMappingURL=index.js.map 8 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/absolute-sourceroot/out/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;AAAA,SAAgB,MAAM,CAAC,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAFD,wBAEC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/absolute-sourceroot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "out/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/absolute-sourceroot/src/index.ts: -------------------------------------------------------------------------------- 1 | export function double(n: number) { 2 | return n * 2; 3 | } 4 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/foo/out/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | function double(n) { 4 | return n * 2; 5 | } 6 | exports.double = double; 7 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/foo/out/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,SAAgB,MAAM,CAAC,CAAS;IAC9B,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAFD,wBAEC"} -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/foo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "out/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /testWorkspace/nodeModuleBreakpoint/node_modules/@c4312/foo/src/index.ts: -------------------------------------------------------------------------------- 1 | export function double(n: number) { 2 | return n * 2; 3 | } 4 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/Makefile: -------------------------------------------------------------------------------- 1 | FLAG_OUTDATED = -ldflags "-s -w -X main.version=v6.0.0" 2 | FLAG_CURRENT = -ldflags "-s -w -X main.version=v12.0.0" 3 | SRC = program.go 4 | OUT = outdated/node.exe up-to-date/node.exe 5 | 6 | all: $(OUT) 7 | 8 | clean: 9 | rm -f $(OUT) 10 | 11 | outdated/node.exe: $(SRC) 12 | GOOS=windows GOARCH=amd64 go build $(FLAG_OUTDATED) -o $@ ./program.go 13 | 14 | up-to-date/node.exe: $(SRC) 15 | GOOS=windows GOARCH=amd64 go build $(FLAG_CURRENT) -o $@ ./program.go 16 | 17 | .PHONY: all clean 18 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/no-node/babel.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/no-node/babel.cmd -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/no-node/npm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/no-node/npm -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/no-node/npm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/no-node/npm.exe -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/node-module/node_modules/.bin/node: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "v12.0.0" 4 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/node-module/node_modules/.bin/node.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/node-module/node_modules/.bin/node.exe -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/node-module/package.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/outdated/node: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "v6.0.0" 4 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/outdated/node.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/outdated/node.exe -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/outdated/npm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/outdated/npm -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/outdated/npm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/outdated/npm.exe -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/program.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | var version string 6 | 7 | func main() { 8 | fmt.Println(version) 9 | } 10 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/up-to-date/node: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "v12.0.0" 4 | -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/up-to-date/node.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/up-to-date/node.exe -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/up-to-date/npm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/up-to-date/npm -------------------------------------------------------------------------------- /testWorkspace/nodePathProvider/up-to-date/npm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/nodePathProvider/up-to-date/npm.exe -------------------------------------------------------------------------------- /testWorkspace/node_modules/browser-pack/_prelude.js: -------------------------------------------------------------------------------- 1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i { 17 | console.log('do nothing'); 18 | }; 19 | 20 | setInterval(() => { 21 | const start = Date.now(); 22 | const busyStuff = doBusyWork(); 23 | console.log('hello'); 24 | }, 100); 25 | -------------------------------------------------------------------------------- /testWorkspace/simpleNode/simpleWebpack.ts: -------------------------------------------------------------------------------- 1 | debugger; 2 | -------------------------------------------------------------------------------- /testWorkspace/simpleNode/simpleWebpackWithQuery.ts: -------------------------------------------------------------------------------- 1 | debugger; 2 | -------------------------------------------------------------------------------- /testWorkspace/simpleNode/skipFiles.js: -------------------------------------------------------------------------------- 1 | const skipped = require('./skippedScript'); 2 | 3 | const fns = { 4 | ...skipped, 5 | caughtInUserCode: () => { 6 | try { 7 | skipped.uncaught(); 8 | } catch (e) { 9 | // ignored 10 | } 11 | }, 12 | }; 13 | 14 | setTimeout(() => { 15 | fns[process.argv[3]](); 16 | process.exit(0); 17 | }, process.argv[2]); 18 | -------------------------------------------------------------------------------- /testWorkspace/simpleNode/skippedScript.js: -------------------------------------------------------------------------------- 1 | exports.uncaught = () => { 2 | throw 'uncaught'; 3 | } 4 | 5 | exports.caught = () => { 6 | try { 7 | throw 'caught'; 8 | } catch (e) { 9 | // ignored 10 | } 11 | } 12 | 13 | exports.rethrown = () => { 14 | try { 15 | throw 'rethrown'; 16 | } catch (e) { 17 | throw e; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /testWorkspace/sourceMapLocations/babel.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var a = 0; 4 | 5 | function foo() { 6 | console.log(a); 7 | a++; 8 | console.log(a); 9 | } 10 | 11 | foo(); 12 | 13 | //# sourceMappingURL=babel.js.map 14 | 15 | /* Original via `babel test.ts --source-maps --plugins @babel/plugin-transform-typescript --presets @babel/preset-env`: 16 | 17 | let a = 0; 18 | 19 | function foo() { 20 | console.log(a); 21 | a++; 22 | console.log(a); 23 | } 24 | 25 | foo(); 26 | 27 | */ 28 | -------------------------------------------------------------------------------- /testWorkspace/sourceMapLocations/babel.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["test.ts"],"names":[],"mappings":";;AAAA,IAAI,CAAC,GAAG,CAAR;;AAEA,SAAS,GAAT,GAAe;AACb,EAAA,OAAO,CAAC,GAAR,CAAY,CAAZ;AACA,EAAA,CAAC;AACD,EAAA,OAAO,CAAC,GAAR,CAAY,CAAZ;AACD;;AAED,GAAG","file":"stdout","sourcesContent":["let a = 0;\n\nfunction foo() {\n console.log(a);\n a++;\n console.log(a);\n}\n\nfoo();\n"]} 2 | -------------------------------------------------------------------------------- /testWorkspace/sourceMapLocations/tsc.js: -------------------------------------------------------------------------------- 1 | var a = 0; 2 | function foo() { 3 | console.log(a); 4 | a++; 5 | console.log(a); 6 | } 7 | foo(); 8 | //# sourceMappingURL=tsc.js.map 9 | 10 | 11 | /* Original via `tsc test.ts --sourceMap`: 12 | 13 | let a = 0; 14 | 15 | function foo() { 16 | console.log(a); 17 | a++; 18 | console.log(a); 19 | } 20 | 21 | foo(); 22 | 23 | */ 24 | -------------------------------------------------------------------------------- /testWorkspace/sourceMapLocations/tsc.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AAEV,SAAS,GAAG;IACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,EAAE,CAAC;IACJ,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC;AAED,GAAG,EAAE,CAAC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/sourceQueryString/input.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/sourceQueryString/input.ts -------------------------------------------------------------------------------- /testWorkspace/sourceQueryString/output.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | debugger; 3 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnB1dC50cz9oZWxsb3dvcmxkIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFRLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJkZWJ1Z2dlcjtcbiJdfQ== 4 | -------------------------------------------------------------------------------- /testWorkspace/tsNode/double.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------- 2 | * Copyright (C) Microsoft Corporation. All rights reserved. 3 | *--------------------------------------------------------*/ 4 | console.assert(true); // some statement since you cannot set a breakpoint at a fn declaration 5 | 6 | export function triple(n: number) { 7 | return n * 3; 8 | } 9 | 10 | export interface ISomeStuffToMakeLinesNotMatch { 11 | some: true; 12 | properties: false; 13 | here: string; 14 | } 15 | 16 | export function double(n: number) { 17 | return n * 2; // this line is a different # in the compiled source 18 | } 19 | -------------------------------------------------------------------------------- /testWorkspace/tsNode/index.js: -------------------------------------------------------------------------------- 1 | const tsn = require('ts-node'); 2 | 3 | tsn.register({ transpileModule: true }); 4 | 5 | const { double, triple } = require('./double.ts'); 6 | 7 | console.log(triple(3)); 8 | console.log(double(21)); 9 | 10 | require('./matching-line.ts'); 11 | require('./log.ts'); 12 | -------------------------------------------------------------------------------- /testWorkspace/tsNode/log.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line header/header 2 | console.log('hi'); 3 | -------------------------------------------------------------------------------- /testWorkspace/tsNode/matching-line.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | console.log('a'); 3 | console.log('b'); 4 | console.log('c'); 5 | -------------------------------------------------------------------------------- /testWorkspace/tsNode/withAbsRoot.js: -------------------------------------------------------------------------------- 1 | const tsn = require('ts-node'); 2 | 3 | tsn.register({ 4 | transpileModule: true, 5 | compilerOptions: { sourceRoot: __dirname.replace(/\\/g, '/') }, 6 | }); 7 | 8 | const { double } = require('./double.ts'); 9 | 10 | console.log(double(21)); 11 | -------------------------------------------------------------------------------- /testWorkspace/tsNodeApp/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "trace": true, 15 | "program": "${workspaceFolder}\\app.ts", 16 | "outFiles": [ 17 | "${workspaceFolder}/**/*.js" 18 | ] 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /testWorkspace/tsNodeApp/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | console.log("Line 1"); 3 | console.log("Line 2"); 4 | console.log("Line 3"); 5 | console.log("Line 4"); 6 | console.log("Line 5"); 7 | console.log("Line 6"); 8 | console.log("Line 7"); 9 | console.log("Line 8"); 10 | //# sourceMappingURL=app.js.map -------------------------------------------------------------------------------- /testWorkspace/tsNodeApp/app.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC"} -------------------------------------------------------------------------------- /testWorkspace/tsNodeApp/app.ts: -------------------------------------------------------------------------------- 1 | console.log("Line 1"); 2 | console.log("Line 2"); 3 | console.log("Line 3"); 4 | console.log("Line 4"); 5 | console.log("Line 5"); 6 | console.log("Line 6"); 7 | console.log("Line 7"); 8 | console.log("Line 8"); 9 | -------------------------------------------------------------------------------- /testWorkspace/tsNodeApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": ".", 6 | "lib": [ 7 | "dom" 8 | ], 9 | "sourceMap": true, 10 | "rootDir": ".", 11 | "strict": true /* enable all strict type-checking options */ 12 | /* Additional Checks */ 13 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 14 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 15 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 16 | }, 17 | "files": ["app.ts"] 18 | } 19 | 20 | -------------------------------------------------------------------------------- /testWorkspace/web/addWorker.js: -------------------------------------------------------------------------------- 1 | window.w = new Worker('worker.js'); 2 | -------------------------------------------------------------------------------- /testWorkspace/web/asyncStack.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testWorkspace/web/asyncStack.js: -------------------------------------------------------------------------------- 1 | setTimeout(() => { 2 | debugger; 3 | 4 | setTimeout(() => { 5 | debugger; 6 | }, 100); 7 | }, 100); 8 | -------------------------------------------------------------------------------- /testWorkspace/web/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /testWorkspace/web/basic.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function plusTwo(num) { 3 | return num + 2; 4 | } 5 | function printArr(arr) { 6 | for (const num of arr) { 7 | console.log(plusTwo(num)); 8 | } 9 | } 10 | function abcdef() { 11 | var obj1 = { 12 | a: 1, 13 | b: 2, 14 | c: " " 15 | }; 16 | console.log("hello!"); 17 | printArr([obj1.a, obj1.b]); 18 | } 19 | abcdef(); 20 | //# sourceMappingURL=basic.js.map -------------------------------------------------------------------------------- /testWorkspace/web/basic.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"basic.js","sourceRoot":"","sources":["basic.ts"],"names":[],"mappings":";AAAA,SAAS,OAAO,CAAC,GAAW;IACxB,OAAO,GAAG,GAAG,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,GAAa;IAC3B,KAAI,MAAM,GAAG,IAAI,GAAG,EAAE;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;KAC7B;AACL,CAAC;AAED,SAAS,MAAM;IACX,IAAI,IAAI,GAAG;QACP,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,GAAG;KACT,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,EAAE,CAAC"} -------------------------------------------------------------------------------- /testWorkspace/web/basic.ts: -------------------------------------------------------------------------------- 1 | function plusTwo(num: number) { 2 | return num + 2; 3 | } 4 | 5 | function printArr(arr: number[]) { 6 | for(const num of arr) { 7 | console.log(plusTwo(num)); 8 | } 9 | } 10 | 11 | function abcdef(): void { 12 | var obj1 = { 13 | a: 1, 14 | b: 2, 15 | c: " " 16 | } 17 | console.log("hello!"); 18 | printArr([obj1.a, obj1.b]); 19 | } 20 | 21 | abcdef(); -------------------------------------------------------------------------------- /testWorkspace/web/browserify/browserify.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testWorkspace/web/browserify/index.ts: -------------------------------------------------------------------------------- 1 | import * as m1 from './module1'; 2 | import * as m2 from './module2'; 3 | 4 | window['throwError'] = m1.throwError; 5 | window['throwValue'] = m1.throwValue; 6 | window['pause'] = m1.foo; 7 | window['callBack'] = m2.bar; 8 | window['logSome'] = function logSome() { 9 | console.log(m1.kModule1 + m2.kModule2); 10 | } 11 | -------------------------------------------------------------------------------- /testWorkspace/web/browserify/module1.ts: -------------------------------------------------------------------------------- 1 | export const kModule1 = 1; 2 | export function foo() { 3 | debugger; 4 | } 5 | export function throwError(s) { 6 | throw new Error(s); 7 | } 8 | export function throwValue(v) { 9 | throw v; 10 | } 11 | -------------------------------------------------------------------------------- /testWorkspace/web/browserify/module2.ts: -------------------------------------------------------------------------------- 1 | export const kModule2 = 2; 2 | export function bar(callback) { 3 | callback(); 4 | } 5 | export function pause() { 6 | debugger; 7 | } 8 | -------------------------------------------------------------------------------- /testWorkspace/web/browserify/pause.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testWorkspace/web/browserify/pause.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../../node_modules/browser-pack/_prelude.js","module1.ts","module2.ts","pause.ts"],"names":[],"mappings":"AAAA;;;ACAa,QAAA,QAAQ,GAAG,CAAC,CAAC;AAC1B,SAAgB,GAAG;IACjB,QAAQ,CAAC;AACX,CAAC;AAFD,kBAEC;AACD,SAAgB,UAAU,CAAC,CAAC;IAC1B,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAFD,gCAEC;AACD,SAAgB,UAAU,CAAC,CAAC;IAC1B,MAAM,CAAC,CAAC;AACV,CAAC;AAFD,gCAEC;;;;;ACTY,QAAA,QAAQ,GAAG,CAAC,CAAC;AAC1B,SAAgB,GAAG,CAAC,QAAQ;IAC1B,QAAQ,EAAE,CAAC;AACb,CAAC;AAFD,kBAEC;AACD,SAAgB,KAAK;IACnB,QAAQ,CAAC;AACX,CAAC;AAFD,sBAEC;;;;;ACND,8BAAgC;AAChC,8BAAgC;AAEhC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC","file":"generated.js","sourceRoot":""} -------------------------------------------------------------------------------- /testWorkspace/web/browserify/pause.ts: -------------------------------------------------------------------------------- 1 | import * as m1 from './module1'; 2 | import * as m2 from './module2'; 3 | 4 | m2.bar(m1.foo); 5 | -------------------------------------------------------------------------------- /testWorkspace/web/child.html: -------------------------------------------------------------------------------- 1 | child 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /testWorkspace/web/condition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testWorkspace/web/condition.js: -------------------------------------------------------------------------------- 1 | for (var i = 0; i < 5; i++) { 2 | console.log('iteration ' + i); 3 | } 4 | 5 | debugger; 6 | -------------------------------------------------------------------------------- /testWorkspace/web/dir/helloworld.js: -------------------------------------------------------------------------------- 1 | console.log('Hello, world!'); 2 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/c-with-struct.c: -------------------------------------------------------------------------------- 1 | 2 | // Compile with: 3 | // clang -O0 -g -fdebug-compilation-dir=. --target=wasm32-unknown-unknown -nostdlib c-with-struct.c -o c-with-struct.wasm 4 | typedef struct data_t { 5 | char id[12]; 6 | int x; 7 | int y; 8 | } data_t; 9 | 10 | int process(void *data) { 11 | return 0; // Break here and evaluate (data_t*)data in the repl interface 12 | } 13 | 14 | int _start() { 15 | data_t data = { .id = "Hello world", .x = 12, .y = 34 }; 16 | return process(&data); 17 | } -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/c-with-struct.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | C with struct 5 | 6 | 7 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/c-with-struct.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/dwarf/c-with-struct.wasm -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/diverse-inlining-extern.c: -------------------------------------------------------------------------------- 1 | #define INLINE __attribute__((always_inline)) 2 | #include "diverse-inlining.h" 3 | 4 | int bar(int x) { 5 | return foo(x); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/diverse-inlining-main.c: -------------------------------------------------------------------------------- 1 | #define INLINE __attribute__((noinline)) 2 | #include "diverse-inlining.h" 3 | 4 | extern int bar(int); 5 | 6 | int main(int argc, char** argv) { 7 | argc = foo(argc); 8 | argc = bar(argc); 9 | return argc; 10 | } 11 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/diverse-inlining.h: -------------------------------------------------------------------------------- 1 | INLINE static int foo(int x) { 2 | x = x + 1; 3 | return x; 4 | } 5 | 6 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/diverse-inlining.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/dwarf/diverse-inlining.wasm -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/fibonacci.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int fib(int n) { 4 | int a, b = 0, c = 1; 5 | for (int i = 1; i < n; ++i) { 6 | a = b; 7 | b = c; 8 | c = a + b; 9 | } 10 | return c; 11 | } 12 | 13 | int main() { 14 | int a = fib(9); 15 | printf("9th fib: %d\n", a); 16 | int b = fib(5); 17 | printf("5th fib: %d\n", b); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/fibonacci.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/dwarf/fibonacci.wasm -------------------------------------------------------------------------------- /testWorkspace/web/dwarf/readme.md: -------------------------------------------------------------------------------- 1 | These examples are a subset of those from https://github.com/bmeurer/emscripten-dbg-stories 2 | -------------------------------------------------------------------------------- /testWorkspace/web/empty.js: -------------------------------------------------------------------------------- 1 | "111111111111111111111111111111111111111111111111111" 2 | -------------------------------------------------------------------------------- /testWorkspace/web/empty2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/empty2.js -------------------------------------------------------------------------------- /testWorkspace/web/frames.html: -------------------------------------------------------------------------------- 1 | main 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /testWorkspace/web/grandchild.html: -------------------------------------------------------------------------------- 1 | grandchild 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testWorkspace/web/hello.js: -------------------------------------------------------------------------------- 1 | setInterval(() => { 2 | console.log('boop'); 3 | }, 100); 4 | -------------------------------------------------------------------------------- /testWorkspace/web/iframe-1582/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testWorkspace/web/iframe-1582/inner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testWorkspace/web/iframe-1582/inner.js: -------------------------------------------------------------------------------- 1 | let i = 0; 2 | setInterval(() => { 3 | i++; 4 | }, 50); 5 | -------------------------------------------------------------------------------- /testWorkspace/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testWorkspace/web/inlinescript.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /testWorkspace/web/inlinescriptpause.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /testWorkspace/web/logging.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testWorkspace/web/logging.js: -------------------------------------------------------------------------------- 1 | var foo = 1; 2 | var bar = 'bar'; 3 | var baz = 'baz'; 4 | 5 | function f() { 6 | 1+2; 7 | 1+2; 8 | 1+2; 9 | 1+2; 10 | 1+2; 11 | 1+2; 12 | 1+2; 13 | 1+2; 14 | 1+2; 15 | 1+2; 16 | 1+2; 17 | 1+2; 18 | 1+2; 19 | 1+2; 20 | 1+2; 21 | 1+2; 22 | 1+2; 23 | } 24 | f(); 25 | f(); 26 | 27 | function g() { 28 | 1+2; 29 | } 30 | 31 | function z() { 32 | return 4 + 3; 33 | } 34 | 35 | z(); 36 | -------------------------------------------------------------------------------- /testWorkspace/web/minified/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /package-lock.json 3 | -------------------------------------------------------------------------------- /testWorkspace/web/minified/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testWorkspace/web/minified/index.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | const outer = 1; 3 | if (outer) { 4 | const inner1 = 2; 5 | const inner2 = 3; 6 | hitDebugger(inner1, inner2); 7 | } 8 | 9 | const later = 4; 10 | hitDebugger(later); 11 | 12 | function hitDebugger(arg1, arg2) { 13 | debugger; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /testWorkspace/web/minified/index.min.js: -------------------------------------------------------------------------------- 1 | function test(){const n=1;if(n){const n=2;const t=3;c(n,t)}const t=4;c(t);function c(n,t){debugger}} 2 | //# sourceMappingURL=index.min.js.map -------------------------------------------------------------------------------- /testWorkspace/web/minified/index.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.js"],"names":["test","outer","inner1","inner2","hitDebugger","later","arg1","arg2"],"mappings":"AAAA,SAASA,OACP,MAAMC,EAAQ,EACd,GAAIA,EAAO,CACT,MAAMC,EAAS,EACf,MAAMC,EAAS,EACfC,EAAYF,EAAQC,GAGtB,MAAME,EAAQ,EACdD,EAAYC,GAEZ,SAASD,EAAYE,EAAMC,GACzB"} -------------------------------------------------------------------------------- /testWorkspace/web/minified/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "minify": "terser index.js -m -o index.min.js --source-map \"url=index.min.js.map\"" 4 | }, 5 | "dependencies": { 6 | "terser": "^5.7.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /testWorkspace/web/pathMapped/app.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | void (0); // break here 3 | } 4 | foo(); 5 | //# sourceMappingURL=app.js.map -------------------------------------------------------------------------------- /testWorkspace/web/pathMapped/app.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,SAAS,GAAG;IACV,KAAI,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa;AACxB,CAAC;AAED,GAAG,EAAE,CAAC"} -------------------------------------------------------------------------------- /testWorkspace/web/pathMapped/app.ts: -------------------------------------------------------------------------------- 1 | function foo() { 2 | void(0); // break here 3 | } 4 | 5 | foo(); 6 | -------------------------------------------------------------------------------- /testWorkspace/web/pathMapped/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testWorkspace/web/pretty/pretty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /testWorkspace/web/pretty/ugly.js: -------------------------------------------------------------------------------- 1 | let i = 0; 2 | 3 | i++;i++;i++;i++;i++;i++;i++;i++;i++; 4 | 5 | console.log(i); 6 | 7 | i++;i++;i++;i++;i++;i++;i++;i++;i++; 8 | 9 | console.log(i); 10 | -------------------------------------------------------------------------------- /testWorkspace/web/restart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testWorkspace/web/restart.js: -------------------------------------------------------------------------------- 1 | let a = 0; 2 | 3 | (() => { 4 | a++; 5 | a++; 6 | a++; 7 | })(); 8 | 9 | -------------------------------------------------------------------------------- /testWorkspace/web/script-with-query-param.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testWorkspace/web/script.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testWorkspace/web/script.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | bar(); 3 | } 4 | 5 | function bar() { 6 | console.log('here'); 7 | } 8 | 9 | foo(3); 10 | debugger; 11 | foo(); 12 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/async.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.js","sourceRoot":"","sources":["async.ts"],"names":[],"mappings":";;;;;;;;;AAAA,SAAe,GAAG;;QAChB,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,QAAQ,CAAC;QACT,MAAM,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IACxB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/async.ts: -------------------------------------------------------------------------------- 1 | async function foo(): Promise { 2 | let x = 1; 3 | return x + 3; 4 | } 5 | 6 | async function main(): Promise { 7 | debugger; 8 | const z = await foo(); 9 | } 10 | 11 | main(); 12 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/directional.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function mapped1() { 3 | return 1; 4 | } 5 | function mapped2() { 6 | return 2; 7 | } 8 | function doCall(fn) { 9 | fn(); 10 | } 11 | //# sourceMappingURL=directional.js.map 12 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/directional.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"directional.js","sourceRoot":"","sources":["directional.ts"],"names":[],"mappings":";AAAA,SAAS,OAAO;IACd,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,OAAO;IACd,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,MAAM,CAAC,EAAc;IAC5B,EAAE,EAAE,CAAC;AACP,CAAC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/exceptionBp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function bar() { 3 | foo(); 4 | } 5 | bar(); 6 | //# sourceMappingURL=exceptionBp.js.map 7 | 8 | function foo() { 9 | throw new Error('oh no!'); 10 | } 11 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/exceptionBp.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["exceptionBp.ts"],"names":[],"mappings":";AAEA,SAAS,GAAG;IACV,GAAG,EAAE,CAAC;AACR,CAAC;AAED,GAAG,EAAE,CAAC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/missingMap.js: -------------------------------------------------------------------------------- 1 | function doCallback(callback) { 2 | callback(); 3 | } 4 | //# sourceMappingURL=missingMap.js.map 5 | -------------------------------------------------------------------------------- /testWorkspace/web/smartStep/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "sourceMap": true 5 | } 6 | } -------------------------------------------------------------------------------- /testWorkspace/web/stepInTargets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /testWorkspace/web/stepInTargets.js: -------------------------------------------------------------------------------- 1 | function doTest() { 2 | class Foo { bar() { return 42 } } 3 | function identity(a) { return a } 4 | identity(new Foo()) 5 | identity(identity(new Foo().bar())) 6 | } 7 | -------------------------------------------------------------------------------- /testWorkspace/web/stringFormats.html: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | -------------------------------------------------------------------------------- /testWorkspace/web/urlSourcemap/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | let i = 0; 3 | i++; 4 | debugger; 5 | i++; 6 | i++; 7 | i++; 8 | i++; 9 | i++; 10 | console.log(i); 11 | //# sourceMappingURL=http://localhost:8001/urlSourcemap/index.js.map 12 | //# sourceURL=http://localhost:8001/urlSourcemap/index.js 13 | -------------------------------------------------------------------------------- /testWorkspace/web/urlSourcemap/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":".","sources":["./index.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,CAAC,EAAE,CAAC;AACJ,QAAQ,CAAC;AACT,CAAC,EAAE,CAAC;AACJ,CAAC,EAAE,CAAC;AACJ,CAAC,EAAE,CAAC;AACJ,CAAC,EAAE,CAAC;AACJ,CAAC,EAAE,CAAC;AACJ,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"} 2 | -------------------------------------------------------------------------------- /testWorkspace/web/urlSourcemap/index.ts: -------------------------------------------------------------------------------- 1 | let i = 0; 2 | i++; 3 | debugger; 4 | i++; 5 | i++; 6 | i++; 7 | i++; 8 | i++; 9 | console.log(i); 10 | -------------------------------------------------------------------------------- /testWorkspace/web/vscode-204784/.gitignore: -------------------------------------------------------------------------------- 1 | !/dist 2 | -------------------------------------------------------------------------------- /testWorkspace/web/vscode-204784/dist/index.js: -------------------------------------------------------------------------------- 1 | setInterval(() =>{},1000) 2 | //# sourceURL=mapped://dist/index.js 3 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb25zb2xlIiwibG9nIl0sInNvdXJjZXMiOlsibWFwcGVkOi8vc3JjL29yaWdpbmFsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKCdoZWxsbyB3b3JsZCcpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQUEsT0FBTyxDQUFDQyxHQUFHLENBQUMsYUFBYSxDQUFDIn0= 4 | -------------------------------------------------------------------------------- /testWorkspace/web/vscode-204784/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testWorkspace/web/vscode-204784/src/original.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/vscode-204784/src/original.js -------------------------------------------------------------------------------- /testWorkspace/web/vue/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/vue/favicon.ico -------------------------------------------------------------------------------- /testWorkspace/web/vue/img/logo.82b9c7a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/vue/img/logo.82b9c7a5.png -------------------------------------------------------------------------------- /testWorkspace/web/vue/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | hello-vue 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /testWorkspace/web/wasm/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /testWorkspace/web/wasm/hello.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/web/wasm/hello.wasm -------------------------------------------------------------------------------- /testWorkspace/web/webpack/relative-paths.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testWorkspace/web/webpack/relative-paths.js: -------------------------------------------------------------------------------- 1 | import { sayHello } from '../../greet'; 2 | import { sayGoodbye } from './farewell'; 3 | sayHello('world'); 4 | sayGoodbye('world'); 5 | -------------------------------------------------------------------------------- /testWorkspace/web/worker.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /testWorkspace/web/worker.js: -------------------------------------------------------------------------------- 1 | console.error({foo: {bar: 'worker start'}}); 2 | 3 | self.addEventListener('message', e => { 4 | console.error(e.data); 5 | if (e.data === 'pause') 6 | postMessage('pause'); 7 | else if (e.data === 'pauseWorker') 8 | debugger; 9 | else 10 | postMessage({foo: {bar: 'to page'}}); 11 | }); 12 | self.isWorker = true; -------------------------------------------------------------------------------- /testWorkspace/web/workerSourceMap.js: -------------------------------------------------------------------------------- 1 | console.error({ foo: { bar: 'worker start' } }); 2 | self.addEventListener('message', function (e) { 3 | console.error(e.data); 4 | if (e.data === 'pause') 5 | postMessage('pause'); 6 | else 7 | postMessage({ foo: { bar: 'to page' } }); 8 | }); 9 | //# sourceMappingURL=workerSourceMap.js.map -------------------------------------------------------------------------------- /testWorkspace/web/workerSourceMap.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workerSourceMap.js","sourceRoot":"","sources":["workerSourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,KAAK,CAAC,EAAC,GAAG,EAAE,EAAC,GAAG,EAAE,cAAc,EAAC,EAAC,CAAC,CAAC;AAE5C,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAA,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO;QACnB,WAAmB,CAAC,OAAO,CAAC,CAAC;;QAE7B,WAAmB,CAAC,EAAC,GAAG,EAAE,EAAC,GAAG,EAAE,SAAS,EAAC,EAAC,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /testWorkspace/web/workerSourceMap.ts: -------------------------------------------------------------------------------- 1 | console.error({foo: {bar: 'worker start'}}); 2 | 3 | self.addEventListener('message', e => { 4 | console.error(e.data); 5 | if (e.data === 'pause') 6 | (postMessage as any)('pause'); 7 | else 8 | (postMessage as any)({foo: {bar: 'to page'}}); 9 | }); 10 | -------------------------------------------------------------------------------- /testWorkspace/webpackNulByte/build/greeter.js: -------------------------------------------------------------------------------- 1 | /******/ (() => { // webpackBootstrap 2 | var __webpack_exports__ = {}; 3 | /*!******************************!*\ 4 | !*** ./src/#hello/world.ts ***! 5 | \******************************/ 6 | console.log('hello world'); 7 | 8 | /******/ })() 9 | ; 10 | //# sourceMappingURL=greeter.js.map 11 | -------------------------------------------------------------------------------- /testWorkspace/webpackNulByte/build/greeter.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"greeter.js","mappings":";;;;;AAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC","sources":["webpack://bug-breakpoint/./src/\u0000#hello/world.ts"],"sourcesContent":["console.log('hello world');\n"],"names":[],"sourceRoot":""} -------------------------------------------------------------------------------- /testWorkspace/webpackNulByte/src/#hello/world.ts: -------------------------------------------------------------------------------- 1 | console.log('hello world'); 2 | -------------------------------------------------------------------------------- /testWorkspace/webview/win/.gitignore: -------------------------------------------------------------------------------- 1 | # User directories created by WebView application 2 | WebView2Sample.exe.WebView2*/ 3 | -------------------------------------------------------------------------------- /testWorkspace/webview/win/WebView2Loader.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/webview/win/WebView2Loader.dll -------------------------------------------------------------------------------- /testWorkspace/webview/win/WebView2Sample.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/webview/win/WebView2Sample.exe -------------------------------------------------------------------------------- /testWorkspace/webview/win/WebView2Sample.iobj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/webview/win/WebView2Sample.iobj -------------------------------------------------------------------------------- /testWorkspace/webview/win/WebView2Sample.ipdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/webview/win/WebView2Sample.ipdb -------------------------------------------------------------------------------- /testWorkspace/webview/win/WebView2Sample.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-js-debug/1032e9280164bb2e14472aab8bf71dfdabf1f254/testWorkspace/webview/win/WebView2Sample.pdb -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "ES2021", 5 | "lib": ["ES2022"], 6 | "moduleResolution": "node", 7 | "noImplicitAny": true, 8 | "noImplicitThis": true, 9 | "sourceMap": true, 10 | "noEmit": true, 11 | "strict": true, 12 | "useUnknownInCatchVariables": false, 13 | "noUnusedLocals": true, 14 | "experimentalDecorators": true, 15 | "alwaysStrict": true, 16 | "esModuleInterop": true, 17 | "skipLibCheck": true, 18 | "jsx": "react", 19 | "jsxFactory": "h", 20 | "types": ["node", "chai-subset", "chai-as-promised", "mocha"], 21 | "paths": { 22 | "jsonc-parser": ["./node_modules/jsonc-parser/lib/esm/main.js"] 23 | } 24 | }, 25 | "include": ["src"] 26 | } 27 | --------------------------------------------------------------------------------