Это старая версия документа!
Visual Studio Code
Download
Errors
Fatal error in V8: v8::Template::Set Invalid value, must be a primitive or a Template
[38052:0708/125749.860972:ERROR:node_bindings.cc(162)] Fatal error in V8: v8::Template::Set Invalid value, must be a primitive or a Template [0708/125749.963308:WARNING:crash_report_exception_handler.cc(235)] UniversalExceptionRaise: (os/kern) failure (5) [0708/125749.963353:ERROR:directory_reader_posix.cc(43)] opendir /Users/mirocow/Library/Application Support/Code/Crashpad/attachments/2606f777-7a39-4b53-a59f-f2747f93e0aa: No such file or directory (2) Segmentation fault: 11
Расширения
Отладка / Расширения
PHP
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www/api": "${workspaceFolder}"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
Electron
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach electron: Renderer Process",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "${workspaceFolder}/packages/insomnia",
"timeout": 30000,
"presentation": {
"hidden": false,
"group": "Insomnia",
"order": 1
},
},
{
"name": "Launch electron: main",
"type": "node",
"request": "launch",
"protocol": "inspector",
"sourceMaps": true,
"presentation": {
"hidden": false,
"group": "Insomnia",
"order": 2
},
"cwd": "${workspaceFolder}/packages/insomnia",
"runtimeExecutable": "${workspaceFolder}/packages/insomnia/node_modules/.bin/electron",
"runtimeArgs": ["--remote-debugging-port=9222", "."],
"outputCapture": "std",
"windows": {
"type": "node",
"request": "launch",
"name": "Electron: main",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"env": {
"NODE_ENV": "development",
"ELECTRON_IS_DEV": "1"
}
},
{
"name": "Launch electron: renderer",
"type": "pwa-chrome",
"request": "attach",
"presentation": {
"hidden": false,
"group": "Insomnia",
"order": 3
},
"port": 9222,
"webRoot": "${workspaceFolder}/packages/insomnia/src",
"timeout": 60000
},
],
"inputs": [
{
"id": "insoCommandArgs",
"description": "Add an additional argument to inso",
"type": "promptString"
},
{
"id": "insoCommand",
"description": "Pick an inso command to run",
"type": "pickString",
"options": [
{
"value": "run test"
},
{
"value": "lint spec"
},
{
"value": "export spec"
},
{
"value": "script"
},
{
"value": "help"
}
]
}
],
"compounds": [
{
"name": "Launch Insomnia",
"presentation": {
"hidden": false,
"group": "Insomnia",
"order": 10
},
"stopAll": true,
"preLaunchTask": "Insomnia: Compile (Watch)",
"configurations": [
"Launch electron: main",
"Launch electron: renderer"
]
}
]
}
Golang
# Base stage for shared environment FROM golang:1.24-alpine AS base WORKDIR /app RUN apk add --no-cache git # Builder stage for production FROM base AS builder COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /app/proxy . # Debug builder stage for delve and debug binary FROM base AS debug-builder RUN go install github.com/go-delve/delve/cmd/dlv@latest COPY go.mod go.sum ./ RUN go mod download COPY . . # Build with optimizations disabled for better debugging RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="all=-N -l" -o /app/proxy . # Debug stage FROM alpine:latest AS debug RUN apk add --no-cache ca-certificates libc6-compat WORKDIR /app COPY --from=debug-builder /go/bin/dlv /usr/local/bin/dlv COPY --from=debug-builder /app/proxy /app/proxy EXPOSE 8080 40000 # Run delve in headless mode CMD ["/usr/local/bin/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/app/proxy"]
services: proxy-debug: build: context: . target: debug environment: - GEMINI_API_KEY=${GEMINI_API_KEY} - LISTEN_ADDR=:8080 ports: - "${PORT:-8080}:8080" - "40000:40000" security_opt: - "seccomp:unconfined" # Required for Delve/ptrace cap_add: - SYS_PTRACE restart: "no"
$ docker compose up proxy-debug
{
"version": "0.2.0",
"configurations": [
{
"name": "Connect to Docker Debug",
"type": "go",
"request": "attach",
"mode": "remote",
"port": 40000,
"host": "127.0.0.1",
"showLog": true,
"dlvFlags": ["--check-go-version=false"],
"substitutePath": [
{
"from": "${workspaceFolder}",
"to": "/app"
}
]
}
]
}
Python
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Remote Attach (Docker)",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/app",
"remoteRoot": "/app"
}
],
"justMyCode": true,
"django": false
},
{
"name": "Python: FastAPI (Local)",
"type": "python",
"request": "launch",
"module": "uvicorn",
"args": [
"app.main:app",
"--reload",
"--host",
"0.0.0.0",
"--port",
"5000"
],
"jinja": true,
"justMyCode": true
}
]
}