Skip to content

Commit

Permalink
Extension update
Browse files Browse the repository at this point in the history
  • Loading branch information
WheretIB committed May 30, 2020
1 parent e944e2a commit abcb18e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 11 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [0.6.0] - 2020-05-30

### Added

- Support for breakpoints
- Support for Step Over, Step In and Step Out
- Debug logs
- Function name cache for fast stack filter for Lua 5.2 and 5.3
- Lua function upvalue support in expression evaluation and Locals window

### Changed

- Fixed access to local functions list of a Lua function
- Fixed enumeration size and double completion callback call in Locals window
- Additional stack filter optimizations
- Hide Lua call stack frames between internal Lua calls for Lua 5.3

## [0.4.1] - 2020-05-23

### Added
Expand Down
4 changes: 2 additions & 2 deletions LuaDkmDebugger/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="LuaDkmDebugger.e3e2ef04-27c9-46a6-ad45-79bd29067eb6" Version="0.4.1" Language="en-US" Publisher="WheretIB" />
<Identity Id="LuaDkmDebugger.e3e2ef04-27c9-46a6-ad45-79bd29067eb6" Version="0.6" Language="en-US" Publisher="WheretIB" />
<DisplayName>C++ debugger extensions for Lua</DisplayName>
<Description xml:space="preserve">This Visual Studio extension enables support for inspection of Lua state in C++ applications during debug.</Description>
<Description xml:space="preserve">This extension adds integrated debugging for Lua scripts executing inside C++ applications with Lua library.</Description>
<License>license.txt</License>
<ReleaseNotes>https://raw.githubusercontent.com/WheretIB/LuaDkmDebugger/master/CHANGELOG.md</ReleaseNotes>
<Tags>lua, debugger</Tags>
Expand Down
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# C++ Debugger Extensions for Lua

---
This Visual Studio extension enables limited support for inspection of Lua state in C++ applications during debug.
This Visual Studio extension enables debugging of Lua scripts running inside C++ applications with Lua library.

Supported Lua versions:
* Lua 5.3
Expand All @@ -10,17 +10,23 @@ Supported Lua versions:

[Extension on Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=wheretib.lua-dkm-debug)

### Features:
* Lua 'inline' stack frame insertion into the Call Stack
* Mark Lua library stack frames as non-user code
* Jump to Lua source/line from Lua stack frames
* Function argument and local variable display in the 'Locals' watch section
* Local variable lookup and expression evaluation in Watch, Immediate and similar elements
## Features:
* Lua call stack frames in the Call Stack window
* Lua library call stack frames are marked as non-user code
* Jump to Lua source/line from Lua call stack frames
* Function arguments, local variables and upvalues are displayed in the 'Locals' window
* Lua expression evaluation in Watch, Immediate and similar elements
* Numeric and user data values can be modified
* Breakpoints
* Known issue: breakpoints must be set after the debugger is launched
* Up to 256 breakpoints are supported
* Step Over, Step Into and Step Out

![Example debug session](https://github.com/WheretIB/LuaDkmDebugger/blob/master/resource/front_image_2.png?raw=true)

![Example debug session](https://github.com/WheretIB/LuaDkmDebugger/blob/master/resource/front_image.png?raw=true)

### Additional configuration
## Additional configuration

In the default configuration, debugger searches for script files in current working directory and application executable directory.

Expand All @@ -39,6 +45,22 @@ Add `ScriptPaths` key with an array of additional search paths.
}
```

### Known Issues:
## Troubleshooting

If you experience issues with the extension, you can enable debug logs in 'Extensions -> Lua Debugger' menu if you wish to provide additional info in your report.

### Breakpoints and Stepping information

As in other Lua debuggers, breakpoints are implemented using Lua library hooks. The hook is set as soon as Lua state is created.

If you use your own Lua hooks in your application, you can call the previous hook function from your hook.

This debugger or other debuggers might override each other hooks, so if breakpoints are not hit, this might be the reason.

If you experience issues with the debugger on launch, you can disable attachment to your process in 'Extensions -> Lua Debugger' menu. Debug logs can be enabled there as well if you wish to report the issue. (note that names of your Lua scripts might be included in the log). If debugger attachment is disabled, all features except for breakpoints and stepping will still work.

## Known Issues:
* This extension will always add Lua module to the application (can be seen in 'Modules' section of the debugger) even when debugging applications with no Lua code (check notes in RemoteComponent.cs)
* Lua 5.2 is assumed to be compiled with LUA_NANTRICK in x86 (default configuration)
* Breakpoints must be set after the debugger is launched
* Step Into from Lua into C++ doesn't work at the moment

0 comments on commit abcb18e

Please sign in to comment.