You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: debugging/index.md
+32
Original file line number
Diff line number
Diff line change
@@ -53,10 +53,42 @@ This will compile Fano Framework web application with debugging information.
53
53
54
54
Back to Visual Studio Code IDE. Open source code file you want to debug and toggle breakpoint at line of interest by clicking on empty area left of line number. Activate *Run* tab click green button on left of *Debug Fano* to start debugging.
55
55
56
+
This will run application. Open Internet browser and type URL so that breakpoint is hit.
57
+
56
58
## Debugging in Lazarus IDE
57
59
58
60
*TODO*
59
61
62
+
## Debugging CGI web application
63
+
64
+
It may be tricky to debug CGI web applications as they are run by web server. However you can simulate running CGI script using `tools/simulate.run.sh` shell script that is generated when you use [Fano CLI](/scaffolding-with-fano-cli) to create project.
65
+
66
+
To debug CGI web application with Visual Studio Code, edit `launch.json`
67
+
68
+
```
69
+
{
70
+
"version": "0.2.0",
71
+
"configurations": [
72
+
{
73
+
"name": "Debug Fano CGI",
74
+
"type": "gdb",
75
+
"request": "launch",
76
+
"target": "./public/app.cgi",
77
+
"env": {
78
+
"REQUEST_METHOD": "GET",
79
+
"REQUEST_URI" : "/some-url",
80
+
"QUERY_STRING" : "order=123&user_id=12"
81
+
}
82
+
"cwd": "${workspaceRoot}",
83
+
"valuesFormatting": "parseText"
84
+
}
85
+
]
86
+
}
87
+
```
88
+
89
+
This will simulate run CGI web application when open from Internat browser via URL
0 commit comments