View previous topic :: View next topic |
Author |
Message |
Eurochron89 Newbie cheater Reputation: 1
Joined: 12 Aug 2015 Posts: 17
|
Posted: Thu Aug 13, 2015 3:41 pm Post subject: Hotkeys for Debugging |
|
|
Is it possible to add all the debug Hotkeys to the "Settings > Hotkeys" Tab?
Right now there is only "Debug -> Run" available in that Tab.
But I really need a way to use all the Debug Commands as global hotkeys.
And before you ask why:
I have my game in window mode on one of my screens, and CE is on the other screen.
When I switch to CE the game will automatically enable the ingame menu and therefore most parts of the game are paused.
I need to be able to control the debugging while the game is the active window.
Can this be done with plugins or any other way?
|
|
Back to top |
|
|
Eurochron89 Newbie cheater Reputation: 1
Joined: 12 Aug 2015 Posts: 17
|
Posted: Fri Aug 14, 2015 7:46 pm Post subject: |
|
|
Well, I just answered this myself: it is possible to do this with a Plugin DLL.
Took me some hours to figure this out and add the global HotKeys, but now it works just fine.
I used the 'Exported.debug_continueFromBreakpoint' function:
Code: | // debug_continueFromBreakpoint(int continueoption)
// 0 = Debug -> Run (F9)
// 1 = Debug -> Step into (F7)
// 2 = Debug -> Step over (F8)
|
@DarkByte:
Would you please tell me the easiest way to get the current selected address from the Memory View into the 'Exported.debug_setBreakpoint()' function?
So when I press my hotkey, the DLL loads the current selected address and uses it like this: 'Exported.debug_setBreakpoint(<current address>, 0, 1);'
This is the only part I could not figure out yet, the other hotkeys for Step + Step Over work fine.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 465
Joined: 09 May 2003 Posts: 25540 Location: The netherlands
|
Posted: Fri Aug 14, 2015 7:56 pm Post subject: |
|
|
lua hotkeys can work too (createHotkey)
Code: |
debug_continueFromBreakpoint(continueMethod) : if the debugger is currently waiting to continue you can continue with this. Valid parameters are :co_run (just continue), co_stepinto(when on top of a call, follow it), co_stepover (when on top of a call run till after the call)
|
getting the current selected address from Memview is only possible using the lua interface (plugins can use lua too, the lua_state is provided in the exportlist, honestly, I recommend using all lua)
Code: |
getMemoryViewForm().disassemblerView.SelectedAddress
|
And if multiple lines are selected the range end is in
Code: |
getMemoryViewForm().disassemblerView.SelectedAddress2
|
SelectedAddress is both a read and write property so you can use it to change the currently selected address
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Eurochron89 Newbie cheater Reputation: 1
Joined: 12 Aug 2015 Posts: 17
|
Posted: Fri Aug 14, 2015 8:16 pm Post subject: |
|
|
Dark Byte wrote: | lua hotkeys can work too (createHotkey) |
Oh... very easy. Just tested this, works fine.
Too bad I did not know it was possible with Lua... wasted some time on the DLL.
Dark Byte wrote: | getting the current selected address from Memview is only possible using the lua interface |
This works very nice. Thanks for your help!
|
|
Back to top |
|
|
Eurochron89 Newbie cheater Reputation: 1
Joined: 12 Aug 2015 Posts: 17
|
Posted: Sun Aug 16, 2015 1:57 am Post subject: |
|
|
When I started to add the global HotKeys to the Lua Script, I had to use different keys than CE,
because otherwise the functions would get triggered twice, when the Memory Viewer was the active window.
So I just looked around the CE Lua Wiki, and finally came up with this:
(note: I did not add [F9], because it is in CE's Settings > HotKeys already)
Code: | -- --------------------------------------------------------------
-- This Script adds global HotKeys for CE's Debugger
-- -> Memory Viewer does not have to be the active window
-- -> debugging can be triggered from any window now
-- --------------------------------------------------------------
-- [F5] Debug: Toggle BreakPoint - name = Setbreakpoint1
-- [F6] Debug: Execute till return - name = Executetillreturn1
-- [F7] Debug: Step Into - name = Step1
-- [F8] Debug: Step Over - name = StepOver1
-- --------------------------------------------------------------
-- [F10] Debug: set BreakPoint at current address +2
-- -> this can be usefull to get out of loops
-- --------------------------------------------------------------
-- [F5] Debug: Toggle BreakPoint
function DebugToggleBreakPoint()
-- check if the Memory Viewer Window is the current active Window
-- only execute the function if the Memory Viewer is not active now
if (getMemoryViewForm().isForegroundWindow() == false) then
-- is the debugger already attached?
if (debug_isDebugging() == true) then
-- Memory Viewer Window Menu: Debug -> Toggle Breakpoint [F5]
getMemoryViewForm().Setbreakpoint1.doClick();
end
end
end
-- [F6] Debug: Execute till return
function DebugExecuteTillReturn()
-- check if the Memory Viewer Window is the current active Window
-- only execute the function if the Memory Viewer is not active now
if (getMemoryViewForm().isForegroundWindow() == false) then
-- is the debugger already attached?
if (debug_isDebugging() == true) then
-- Memory Viewer Window Menu: Debug -> Execute till return [F6]
getMemoryViewForm().Executetillreturn1.doClick();
end
end
end
-- [F7] Debug: Step Into
function DebugStepInto()
-- check if the Memory Viewer Window is the current active Window
-- only execute the function if the Memory Viewer is not active now
if (getMemoryViewForm().isForegroundWindow() == false) then
-- is the debugger already attached?
if (debug_isDebugging() == true) then
-- Memory Viewer Window Menu: Debug -> Step Into [F7]
getMemoryViewForm().Step1.doClick();
end
end
end
-- [F8] Debug: Step Over
function DebugStepOver()
-- check if the Memory Viewer Window is the current active Window
-- only execute the function if the Memory Viewer is not active now
if (getMemoryViewForm().isForegroundWindow() == false) then
-- is the debugger already attached?
if (debug_isDebugging() == true) then
-- Memory Viewer Window Menu: Debug -> Step Over [F8]
getMemoryViewForm().StepOver1.doClick();
end
end
end
-- [F10] set BreakPoint at current address +2
-- -> this can be usefull to get out of loops
function CustomBreakPoint2()
-- is the debugger already running?
if (debug_isDebugging() == true) then
-- get current selected address and add '2'
local cAdress = getMemoryViewForm().disassemblerView.SelectedAddress + 2;
-- set a new BreakPoint at that changed address
debug_setBreakpoint(cAdress);
end
end
-- --------------------------------------------------------------
-- create global HotKey [F5] Debug: Toggle BreakPoint
createHotkey(DebugToggleBreakPoint, VK_F5);
-- create global HotKey [F6] Debug: Execute till return
createHotkey(DebugExecuteTillReturn, VK_F6);
-- create global HotKey [F7] Debug: Step Into
createHotkey(DebugStepInto, VK_F7);
-- create global HotKey [F8] Debug: Step Over
createHotkey(DebugStepOver, VK_F8);
-- create global HotKey [F10]: set BreakPoint at current address +2
createHotkey(CustomBreakPoint2, VK_F10);
-- --------------------------------------------------------------
|
Took me some time to figure this all out. It is now working really good.
Maybe someone with the same problem can use this some day, when he finds this thread. ^^
|
|
Back to top |
|
|
SunBeam I post too much Reputation: 65
Joined: 25 Feb 2005 Posts: 4022 Location: Romania
|
Posted: Sun Oct 18, 2015 5:28 pm Post subject: |
|
|
For sure Good job!
|
|
Back to top |
|
|
VENAtory How do I cheat? Reputation: 0
Joined: 15 Nov 2024 Posts: 1
|
Posted: Fri Nov 15, 2024 12:29 pm Post subject: Change Default CE Hotkeys |
|
|
Is there a way to change the default Debug hotkeys (Memory View)?
Instead of F5/F6/F... I want to use different hotkeys.
I searched for files where these defaults could be stored but found nothing.
|
|
Back to top |
|
|
|