Log in to reply
 

Debugging my ScriptHookV script while ScriptHookVDotNet is running?


  • MODERATOR

    So I've come across a new problem in my manual transmission script, which makes my script somehow throw an exception that ScriptHookV catches if the following 3 ingredients are present:

    • ScriptHookVDotNet
    • Manual Transmission
    • A wheel

    Remove any of those and things are okay again. I want to debug this with Visual Studio and just step through the code, but attaching Visual Studio to the GTA V process makes VS while ScriptHookVDotNet is active just makes it see an unknown exception with the game shutting down.

    Now I've known for a while that SHVDN doesn't like to be reloaded and it indeed crashes somewhere somehow on unregistering itself, but the mere presence of it (even after a crash) also triggers a crash in my script.

    Without SHVDN I can attach VS as debugger fine and step through my code without any problems, but since SHVDN + my mod causes these problems I'd like to know what happens. I also can't attach it earlier than in-game, because plenty exceptions seem to be thrown and ignored that VS/x64dbg pick up...

    I'm totally lost here, can anybody help? Solving the SHVDN exceptions by itself (when attaching things and when reloading) would also be nice.


  • MODERATOR

    Update - just throwing out the entire scripts folder made attaching work again, so it's on my own from here on again. SHVDN still doesn't like to be reloaded, but at least I can debug my things now :p


  • MODERATOR

    @ikt Huh!? You're not supposed to attach ScriptHookVDotNet.dll from the game directory! :) I copied both ScriptHookVDotNet.dll and ScriptHookVDotNet.xml, from the SDK, to a folder inside my VS realm, and attached those to Visual Studio 2017.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.