VmDebuggerConnectionInterface Class Reference

#include <vm.h>

Inheritance diagram for VmDebuggerConnectionInterface:

Public Member Functions

MAXON_METHOD String GetName () const
 
MAXON_METHOD Url GetPath () const
 
MAXON_METHOD String GetStartupScript () const
 
MAXON_METHOD String GetShutdownScript () const
 

Private Member Functions

 MAXON_INTERFACE (VmDebuggerConnectionInterface, MAXON_REFERENCE_NORMAL, "net.maxon.python.interface.vmdebuggerconnection")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( VmDebuggerConnectionInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.python.interface.vmdebuggerconnection"   
)
private

◆ GetName()

MAXON_METHOD String GetName ( ) const

Returns the name of the debugger connection.

Returns
Name, e.g. PyDev

◆ GetPath()

MAXON_METHOD Url GetPath ( ) const

Returns the path of the debugger.

Returns
Path to the debugger, allowed to be empty.

◆ GetStartupScript()

MAXON_METHOD String GetStartupScript ( ) const

The debugger shutdown code which gets executed in the target language, before the original script gets executed. If the code fails executing, the error is printed to sys.stderr and the actual script will be executed regardless. E.g. For Python:

{
return String("try:\n"
" import mydebugger\n"
" ptvsd.enable_attach(None)\n"
"except:\n"
" mydebugger = None\n" // before reraising the error, set ptvsd to None,
// so a check can be performed in the shutdown script
" raise\n"); // reraise only in case the current error should be printed to sys.stderr
}
Definition: c4d_string.h:41
MAXON_METHOD String GetStartupScript() const
#define MAXON_METHOD
Definition: interfacebase.h:1012
Returns
Startup script, including \n and 4-spaces. Can return an empty string.

◆ GetShutdownScript()

MAXON_METHOD String GetShutdownScript ( ) const

The debugger shutdown code which gets executed in the target language, which gets executed after the actual script got executed. If the code fails executing, the error is printed to sys.stderr. E.g. For Python:

{
return String("if mydebugger:\n"
" mydebugger.shutdown()\n")
}
MAXON_METHOD String GetShutdownScript() const
Returns
Shutdown script, including \n and 4-spaces. Can return an empty string.