Notifications
Clear all

[Closed] MAXScript Debug

Hi,
Is there any Debug tool in MAXScript?

Thanks.

2 Replies

Short and simple: Nope.

What I usually do is format info to the listener from crucial parts of my script. Far from ideal, but this way you can at least track down which code the script processed before the error occurred.

(
-- variable to toggle debugging on/off
local boolDebug = true

fn Test a b =
(
  -- debug!
   if boolDebug then format "DBG: fn Test
"

  -- do stuff
)

fn AnotherTest a b =
(
  -- debug!
   if boolDebug then format "DBG: fn AnotherTest
"
  -- do stuff
)

)

Martijn

There are a few tools you can use to help debug a script.

Along with Martijn’s Listener idea there is also the MaxScript Variable Monitor, which lets you track the values in variables in real-time. There’s also the [MaxScript Memory Monitor]( http://www.scriptspot.com/scripts/web_upload/Andy Oakley/MemoryChecker.ms), which is handy if your MaxScript is sucking up large amounts of your system memory for some reason.

I wish that Discreet would scuttle VMS and give us a real MaxScript IDE inside of Max.