mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
Code running in a browser could not be debugged: js-debug was only started for Node.js and launch.json entries of type chrome / msedge were skipped on import. A JavaScript Debug run configuration (URL, Chrome or Edge, web root) now opens the page with js-debug attached, so breakpoints in the page's sources are hit through source maps with the usual stepping, variables, evaluate and console. Each project gets its own browser profile under the IDE's local data, a project has one debugged browser of a kind (starting again reuses it), launch.json chrome / msedge launches import as this configuration, child sessions named about:blank take their parent's name, and Vue, Svelte, Astro and HTML files take breakpoints. Not yet available in remote projects. Co-authored-by: ntbang0901 <121003585+ntbang0901@users.noreply.github.com>
41 lines
1.6 KiB
TOML
41 lines
1.6 KiB
TOML
id = "html"
|
||
name = "HTML"
|
||
formatter = { tool = "prettier", parser = "html", range = false }
|
||
extensions = ["html", "htm", "xhtml", "shtml", "html.tmpl"]
|
||
first-line = "^\\s*<!(?i:doctype)\\s+html"
|
||
block-comment = ["<!--", "-->"]
|
||
indent = { tab-size = 2, insert-spaces = true }
|
||
ui-mode = "HTML"
|
||
tree-sitter = "html"
|
||
|
||
# Angular projects: component templates, with bindings and interpolations
|
||
# highlighted as expressions.
|
||
[[framework-ui-modes]]
|
||
ui-mode = "Angular Template"
|
||
root-markers = ["angular.json", "node_modules/@angular/core"]
|
||
|
||
# Angular projects only: component templates. First, so that hover, rename and
|
||
# document symbols of templates come from it rather than plain HTML.
|
||
[[language-servers]]
|
||
name = "angular-language-server"
|
||
command = "ngserver"
|
||
args = ["--stdio", "--includeCompletionsWithSnippetText", "--includeAutomaticOptionalChainCompletions"]
|
||
root-markers = ["angular.json", "node_modules/@angular/core"]
|
||
require-root-marker = true
|
||
install-hint = "npm i -g @angular/language-server"
|
||
|
||
[[language-servers]]
|
||
name = "vscode-html-language-server"
|
||
command = "vscode-html-language-server"
|
||
args = ["--stdio"]
|
||
initialization-options = { provideFormatter = true, embeddedLanguages = { css = true, javascript = true } }
|
||
install-hint = "npm i -g vscode-langservers-extracted"
|
||
|
||
# Scripts in a page run in the browser: breakpoints in them are hit by a JavaScript Debug configuration.
|
||
[debugger]
|
||
adapter = "js-debug"
|
||
command = "js-debug-adapter"
|
||
args = ["${port}", "127.0.0.1"]
|
||
transport = "tcp"
|
||
install-hint = "Install JavaScript Debugger (vscode-js-debug) in Settings › Languages & Frameworks › Language Servers"
|