11-23-2012 05:28 AM
Hi,
I've just started working with BB10 Cascades and QNX Momentics. I've used Qt/QML before on other platforms and the debugging in Qt Creator worked well. According to this:
https://developer.blackberry.com/cascades/document
it should just work in the Momentics IDE too but any breakpoint I set in QML just gets ignored while I'm debugging - breakpoints in C++ code work fine. Anyone else have this problem? Are there some settings/config I'm missing?
Thanks,
Mark
11-30-2012 09:25 AM
Bumping my own post...
In the known issues for beta 4 I found this:
"To debug sample projects that are loaded through the QNX Momentics IDE, debug code needs to be added to main.cpp. Newly created projects do not need enable debugging.
Workaround: If you're debugging based on a sample project, the debug code needed in main.cpp is putting #include <Qt/qdeclarativedebug.h> before the main() function."
This suggests that QML debugging ought to be working for some people at least. I tried adding the mentioned header to my main.cpp file as suggested for sample projects and it didn't make any difference - doesn't work on simulator or device.
Are projects which can't use the QML viewer due to unrecognised imports also unable to debug QML/JS?
Does anyone have QML/JS debugging working?
11-30-2012 11:37 AM
Right now, in my knowledge, there is no way to debug in QML.
All you can do is to log the result or anything to Terminal (SSH from your Target) to see it.
This is my debug QML code. Hope it can help you ![]()
function logToConsole(message) {
message = "\n**************\n" + message + "\n**************\n";
console.log(message);
}
11-30-2012 12:49 PM - edited 11-30-2012 12:51 PM
Thanks - I'm already doing much the same. It's just having had this working in Qt Creator on other platforms plus these from the link in my first post on the thread:
"Debugging is now supported for both C++ and QML/JavaScript."
"In an application that contains both C++ and QML the debugger is able to pass back and forth between the two."
...well, it got me all hopeful of working tools. ![]()
Anyone from RIM confirm this doesn't actually work right now? In which case it'd be good to fix the docs so we don't all waste time trying to figure out what's wrong with our environment.