qDebug prints the argument to stderr (i.e. the Terminal you used to start QCAD). For example:
Code: Select all
/Applications/QCAD-Pro.app/Contents/MacOS/QCAD-Pro -enable-script-debugger
Debug: RDwgPlugin::init
Debug: RDxfPlugin::init
Debug: RHelpPlugin::init
Debug: RProScriptsPlugin::init
...[all output printed with qDebug is shown here]...
To launch the debugger at any point, use the
debugger command instead:
var i = 0;
debugger;
if (...) {...}
Note that getIntersectionPoints(...) returns an array of intersection points, even if there is only one:
var res = line1.getIntersectionPoints(line2);
if (res.length>0) {
var intersectionPoint = res[0];
...
}