Skip to content

Commit 16b13b8

Browse files
committed
debug
1 parent 8c57418 commit 16b13b8

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Debugging
2+
3+
¿Y si nos hace falta depurar el código? ¿Cómo podemos hacerlo?
4+
5+
Si queremos depurar server side, añadimos un _launch.json_
6+
7+
Para ello podemos irnos a: Run and Debug > Create a launch.json file
8+
9+
Y elegir nodejs
10+
11+
Nos crea un _launch.json_, y lo reemplazamos por esto
12+
13+
_.vscode/launch.json_
14+
15+
```json
16+
{
17+
"version": "0.2.0",
18+
"configurations": [
19+
{
20+
"command": "./node_modules/.bin/astro dev",
21+
"name": "Development server",
22+
"request": "launch",
23+
"type": "node-terminal"
24+
}
25+
]
26+
}
27+
28+
```
29+
30+
Y ahora ejecutamos desde el terminal de debug:
31+
32+
```bash
33+
npm run dev
34+
```

0 commit comments

Comments
 (0)