Skip to content

Commit

Permalink
Add #266
Browse files Browse the repository at this point in the history
Add setHiddenBreakpoints attribute in launch.json
  • Loading branch information
zero-plusplus committed Jan 29, 2023
1 parent c59c533 commit a304233
Show file tree
Hide file tree
Showing 12 changed files with 939 additions and 143 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Also want to check the development status, check the [commit history](https://gi
* [#224](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/224) Add `{callstack.trace}` to the MetaVariable
* [#257](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/257) Add Exception Breakpoint
* [#264](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/264) Add `vscode-autohotkey-debug.commands.runToEndOfFunction` vscode command
* [#266](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/266) Add `setHiddenBreakpoints` attribute in launch.json
* [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.pinnedFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
* [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.leftmostFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
* [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.rightmostFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This extension is a debugger adapter for [VSCode](https://code.visualstudio.com/
* Added: [#224](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/224) Add `{callstack.trace}` to the MetaVariable
* Added: [#257](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/257) Add Exception Breakpoint
* Added: [#264](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/264) Add `vscode-autohotkey-debug.commands.runToEndOfFunction` vscode command
* Added: [#266](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/266) Add `setHiddenBreakpoints` attribute in launch.json
* Added: [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.pinnedFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
* Added: [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.leftmostFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
* Added: [#271](https://github.com/zero-plusplus/vscode-autohotkey-debug/issues/271) Add `vscode-autohotkey-debug.variables.rightmostFile` [command variable](https://code.visualstudio.com/docs/editor/variables-reference#_command-variables)
Expand Down
67 changes: 66 additions & 1 deletion demo/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"useExceptionBreakpoint": true,
"useAnnounce": "detail",
"useFunctionBreakpoint": true,
"variableCategories": "recommend"
},
{
Expand Down Expand Up @@ -146,6 +145,72 @@
],
"useAnnounce": "detail",
},
{
"name": "setHiddenBreakpoints Test",
"type": "autohotkey",
"request": "launch",
"program": "${file}",
"useExceptionBreakpoint": true,
"setHiddenBreakpoints": [
{
"label": "Stop On Entry",
"breakpoints": [
{
"target": "${file}",
"line": 1,
}
],
},
{
"label": "Stop On Exit",
"breakpoints": [
{
"target": "${file}",
"line": -1,
}
],
},
{
"label": "Stop On Entry/Exit",
"breakpoints": [
{
"target": "${file}",
"line": [ 1, -1 ],
}
],
},
{
"label": "Function Trace",
"breakpoints": [
{
"target": "*",
"line": 1,
"log": "{A_ThisFunc} start"
},
{
"target": "*",
"line": -1,
"log": "{A_ThisFunc} end",
},
]
},
{
"label": "Global Variable Trace",
"breakpoints": [
{
"target": "${workspaceFolder}/*.*",
"line": {
"pattern": "^\\s*(global)\\s+(?<var>[a-zA-Z0-9@#$]+)\\s*(?=:=)",
"select": "all",
"ignoreCase": true,
"offset": 1,
},
"log": "{GetMeta(\"$1\")} {GetMeta(\"$var\")} := \"{GetVar(GetMeta(\"$var\"))}\"",
},
]
}
],
},
{
"name": "AutoHotkey Debug (UIA)",
"type": "autohotkey",
Expand Down
4 changes: 3 additions & 1 deletion demo/demo.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#SingleInstance Force
#Warn All, StdOut

globalVar := "Global"
global SuperGlobalVar := "SuperGlobal"

Expand Down Expand Up @@ -50,6 +51,7 @@ demo()
circular.circular := circular

instance := new Clazz()
property := instance.property
instance.property := "overwrite"
instance.method()
}
Expand Down Expand Up @@ -81,4 +83,4 @@ class Clazz extends ClazzBase
class ClazzBase
{
baseField := "baseField"
}
}
8 changes: 4 additions & 4 deletions demo/demo.ahk2
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#Warn All, StdOut
#SingleInstance Force
; #Include <Util>
#Include "%A_LineFile%/../lib/Util.ahk"
#Warn All, StdOut

#Include "%A_LineFile%/../lib/Util.ahk"

globalVar := "Global"
global SuperGlobalVar := "SuperGlobal"
Expand Down Expand Up @@ -63,6 +62,7 @@ demo()
circular.circular := circular

instance := Clazz()
property := instance.property
instance.property := "overwrite"
instance.method()
}
Expand Down Expand Up @@ -106,4 +106,4 @@ class Clazz extends ClazzBase
class ClazzBase
{
baseField := "baseField"
}
}
Loading

0 comments on commit a304233

Please sign in to comment.