Giter VIP home page Giter VIP logo

luadkmdebugger's People

Contributors

fsfod avatar neloreck avatar wheretib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luadkmdebugger's Issues

Cannot startup debugger

It shows "The debugger's worker process (msvsmon.exe) unexpectedlly exited. Debuggering will be aborted."
Here's the log file:

INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 9789.4140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 9790.4140625ms
INFO: Check if Lua library is loaded at 9797.40625ms
WARNING: Failed to find Lua library at 9911.3515625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 9911.3515625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 9941.328125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 9942.3203125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 9979.3046875ms
INFO: Found kernel32 library at 9979.3046875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 9991.296875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 9996.2890625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 9997.2890625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10105.2265625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10106.2265625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10132.2109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10132.2109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10147.2109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10148.2109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10171.203125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10171.203125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10214.171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10214.171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10220.1640625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10220.1640625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10226.1640625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10226.1640625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10231.15625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10231.15625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10236.1640625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10237.15625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10242.1484375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10243.1484375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10249.15625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10250.1484375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10255.140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10256.140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10263.140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10263.140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10269.1328125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10270.1484375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10275.140625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10276.1328125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10285.1328125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10285.1328125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10293.1171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10297.125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10302.1171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10303.1171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10307.125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10308.125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10313.1171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10313.1171875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10318.109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10318.109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10323.109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10323.109375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10330.1015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10331.1015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10339.1015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10340.09375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10347.1015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10348.09375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10357.0859375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10357.0859375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10370.0859375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10371.0859375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10379.0703125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10380.0859375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10398.0703125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10399.0703125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10457.0390625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10458.0390625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10482.0078125ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10483.0234375ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10497.015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10497.015625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10517.9921875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10517.9921875ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10548.9765625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad finished at 10549.9765625ms
INFO: IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad begin at 10619.9453125ms
INFO: Check if Lua library is loaded at 10620.9453125ms
INFO: Local symbols connection is not available at 10669.9140625ms

VS version: VS2019 Community Preview 16.8.0 Preview 2.0
System OS: Windows 10
Lua Version: Lua 5,4

Suggest: Regarding self-compiled lua

Regarding self-compiled lua, you need to bring your own pdb file. It is recommended that this be explained in the readme. This can save troubleshooting time.

Add luabind support

Official repository:
https://github.com/luabind/luabind

Forks:
https://github.com/rpavlik/luabind
https://github.com/OpenXRay/luabind-deboostified/

Documentation:
https://github.com/luabind/luabind/wiki/Docs#implementation-notes

The classes and objects are implemented as user data in Lua. To make sure that the user data really is the internal structure it is supposed to be, we tag their metatables. A user data who's metatable contains a boolean member named __luabind_classrep is expected to be a class exported by luabind. A user data who's metatable contains a boolean member named __luabind_class is expected to be an instantiation of a luabind class.

This means that if you make your own user data and tags its metatable with the exact same names, you can very easily fool luabind and crash the application.

In the Lua registry, luabind keeps an entry called __luabind_classes. It should not be removed or overwritten.

Break points lead into Ido.c

Hey there, just wanted to say thanks for sharing this plugin, if I can get it working it will save me a ton of time!

The issue I am experiencing is that I can't get the breakpoints to appropriately fire using VS 2017 and LUA 5.1.5. The sample project works, but when the breakpoints trip in my project it opens up Ido.c... I am using a pre-built LUA dll (built directly from the source, I believe), and I had to copy my lua51.pdb file into the executable folder.

Here is the top of my log:
lua_dkm_debug_log.txt
(Note: I removed a lot of the duplicate messages and redacted some paths)
Some things I noticed comparing it to the working log:

  • fails trying to add hooks to some of the _____x LUA auxiliary functions that were not present in 5.1, might not be an issue
  • does not launch an attacher after hooking?

Any ideas?

Edit: in the current version the file status is 'Loaded from file'

Although the example you provided last time can be debugged. But I still can't debug it myself.

Case address: https://github.com/brinkqiang/dmlua

This example is more complicated and should be able to cover many usage conditions. If this example can be debugged, many examples will be debugged.

More special points.

  1. Directory problem, the debug directory structure is as follows.
    path

The compiled exe is in the Debug directory, and the script is loaded as the upper-level directory of the exe.

  1. Calling method
    The calling method in C++ is as follows.
    CRole* poRole = CRoleMgr::Instance()->CreateRole();
    poRole->SetName("andy");
    poRole->SetHp(9999);
    poRole->SetMp(9999);
    unsigned int dwTaskID = 100;
    LResultINT oResult(-1);
    oDMLuaEngine.Call("script.task.task.AcceptTask", poRole, dwTaskID, &oResult);

  2. seeall
    The seeall attribute is set in the script. I don't know if it will affect it.

module (..., package.seeall)

dmlua_debug

Your help is very much needed.

Hover over complex expressions no longer works in Visual Studio 2022

In Visual Studio 2022, hover over complex expressions no longer works. For example, if you hover over prop in tbl.prop, there is no tool tip. However, now when you hover over tbl, you will have a tool tip with a tree view where you can explore inside.
As a work-around, use Watch or Pin the expression from the root expression tool tip.
When the solution for updated behavior of Visual Studio 2022 arrives, a new release will be made.

Thread lock in LuaJIT when LuaDkmDebugger is attached

My case is

  1. You need to have S.T.A.L.K.E.R.: Call of Pripyat or S.T.A.L.K.E.R.: Clear Sky.
  2. Compile OpenXRay project from sources with Release x64 or Release Master Gold x64 configuration according to the instructions.
  3. Enable 'Attach on Launch' of LuaDkmDebugger.
  4. Launch the game from the Visual Studio.
  5. The main thread will freeze forever inside LuaJIT in lua_newstate function, on if (!lj_prng_seed_secure(&prng)) { line.
    image

Probably, this can be reproduced with just dummy project that calls LuaJIT's implementation of lua_newstate, but I'm not sure.

This issue doesn't require LuaJIT support like #8 :) Just a possibility to improve the interaction with unknown Lua implementations.

Function list

First this is a fantastic job. Thank you. I was wondering if there is support to browse functions in a lua script or is there another extension that you use with this one for that support? If not I was going to look into adding something based on FunctionBar.

The debugger always stop in luaD_hook

I am using project you provided in issues #7 , and add breakpoints like this:
image
When I press F5, the debugger just step into ldo.c luaD_hook function, and never stop in lua file. In addition, I didn't add breakpoint at there. Here's the png:
image

The addin's version is v0.9.6.
Here is log file:
lua_dkm_debug_log.txt

Can you tell me how to solve this problem? Or Do I need provide other imformation?

Here's an example project for Visual Studio 2019 you provided:
lua_dbg_example.zip

Debugger freezes up trying to show a datatip for large Lua tables

The debugger can get bogged down very slowly reading table values in LuaTable.LoadValues when trying to display data tip for large tables with several thousand values.
This was the call stack it was happening in.

	LuaDkmDebuggerComponent.LuaTableData.LoadValues Line 1525	C#	Symbols loaded.
 	LuaDkmDebuggerComponent.EvaluationHelpers.EvaluateValueAtLuaValue Line 224	C#	Symbols loaded.
 	LuaDkmDebuggerComponent.EvaluationHelpers.EvaluateDataAtLuaValue Line 348	C#	Symbols loaded.
 	LuaDkmDebuggerComponent.LocalComponent.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmLanguageExpressionEvaluator.GetItems Line 1649	C#	Symbols loaded.
 	Microsoft.VisualStudio.Debugger.EntryPoint.IDkmLanguageExpressionEvaluator_GetItems	Unknown	No symbols loaded.

It would help to have some cut off when reading the values and all those single memory reads could maybe batch read from a single larger memory read thats cached in a byte buffer to speed things up.

pythonDkmDebugger for python

Hello, LuaDkmDebugger is the best lua plugin I have ever used.
Now I am developing in python. Can you port a python version following the same principle? Because I based on my research on python I found that they have some things in common. For example, modularization, require module -> import module
luaopen + _modulename -> init + modulename
thx!

Can not install by Visual Studio 2022

Use "Extensions"--"Manage Extensions", I can install LuaDkmDebugger by Visual Studio 2019. Now I use 2022, Use "Extensions"--"Manage Extensions" can not find LuaDkmDebugger.

How can I use it on Visual Studio 2022?

LuaJIT support?

Could you look into adding support for LuaJIT, or maybe give an advice where should I start to try adding support for it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.