Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Cbyrdtopper on March 27, 2018, 10:42:49 AM
-
I'm running Build 3713.
I'm trying to debug some macros but it isn't doing anything in Mach4.
For example; I made a simple mc.mccntlSetLastError (inst, "Message") test macro.
I debug this and it doesn't display. I run the macro from MDI and it runs fine.
I have this macro set up exactly as it usually is, with the Debug stuff at the end of the macro.
Is there anything that needs to be done to set this up?
-
Not sure if the typo is the problem or not but you do have one.
Should be mc.mcCntlSetLastError (inst, "Message")
Not mc.mccntlSetLastError (inst, "Message")
Lua is case sensitive.
I have not seen the issue with ZeroBrain myself.
-
Hey Brett,
I have it correct in the Macro. I just typed it wrong on this post.
I'm not sure why it isn't working.
I Opened up the stock mill profile and still no luck. Again, I could run the macro from MDI but it wouldn't debug and make Mach do something.
It debugs like it should; I put some arithmetic in the macro to test the debugger, it did everything correctly. Still didn't do anything in Mach4.
-
I just wrote a m2000 test macro. Works fine from mdi and as I step through it in editor. Writes to the status bar and all. Rename the file to get rid of everything between the last 0 and the dot so its just m2000.mcs
-
No luck. Still runs fine in MDI. It still will not display in debugging.
hmm...
-
I'm just assuming this is the correct message that I should be receiving on execution.
Is this correct?
Program starting as '"C:\Mach4Hobby\ZeroBraneStudio\bin\lua52.exe" -e "io.stdout:setvbuf('no')" -e "do;package.cpath=[[C:\Mach4Hobby\Modules/?.dll;C:\Mach4Hobby\ZeroBraneStudio\bin/clibs52/?.dll]];package.path=[[C:\Mach4Hobby\Modules/?.lua;]]..package.path;mc=require('machipc');mc.mcIpcInit('localhost');scr=require('screenipc');scr.scIpcInit('localhost');require('wx');__IN_EDITOR__=1;__MINSTANCE__=2304;end" "C:\Mach4Hobby\Profiles\Chad\Macros\m307.mcs"'.
Program 'lua52.exe' started in 'C:\Mach4Hobby' (pid: 3804).
Program completed in 0.41 seconds (pid: 3804).
-
Not what mine looks like............
Program starting as '"C:\Mach4Industrial\ZeroBraneStudio\bin\lua52.exe" -e "io.stdout:setvbuf('no')" "C:\Users\me\AppData\Local\Temp\.9764.tmp"'.
Program 'lua52.exe' started in 'C:\Mach4Industrial\Profiles\Test\Macros' (pid: 2132).
Debugging session started in 'C:\Mach4Industrial\Profiles\Test\Macros\'.
Debugging session completed (traced 0 instructions).
Program completed in 1.30 seconds (pid: 2132).
-
Hmm....
You know, I did see Steve talking to someone about Zero Brane so I tried to download it and try it out.
I wonder if I need to go back and delete that and see if that fixes my problem.
-
That's probably not a bad idea either way.
-
Okay, So I did delete it. It isn't on my computer anywhere.
So I have no Idea what to do.....
-
When I stepped through my macro, I get the same message that you put on here.
So that is the same. Just no results on Mach4 still. I am using Hobby. That shouldn't matter though I wouldn't think.
-
I'm not sure either. All I do is open Mach, go to operator, Edit/Debug scripts and browse to the macro I want to step through and it all works good. You might want to delete any .mcc or .bak files in that macros directory before launching Mach just for safe measure.
-
I downloaded build 3756 today to see what was new.
Zero Brane is working properly now. No idea what was going on in the other build.