Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Momentics to Visual Studio... how?

I think I know the answer to this, but maybe somebody else knows an easier way. I've been a professional software developer for well over 25 years and every time I've been forced to use eclipse I've hated it. I've been developing with the Momentics IDE since moving to the BB10 platform, but of course it is just eclipse under the skin, and I despise it just as much as ever. Debugging in eclipse is simply atrocious compared to Visual Studio. Among many other complaints I am frustrated that I can't modify variable values on the fly as I step through code. Momentics also won't let you break when a condition becomes true, which can be very useful when you don't know where something is being modifed during app execution. Just set a conditional breakpoint on the variable in question.

 

I'm looking at alternatives, and QtCreator is one that I'll evaluate, but I am also developing for the desktop with Visual Studio so I thought I'd give the beta VS2012 plugin a try. The problem is that I've got a complicated project already in Momentics that I'd like to migrate over to VS. I suspect I'm going to have to set up a new VS project and paste the old code and assets into it manually, but if there is an easier way I'd love to hear about it.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Momentics to Visual Studio... how?

[ Edited ]

Ooh, you're not having a good day to day are you first Zmey corrects you now I'm about to. Smiley Happy

 

All of those missing eclipse functions you mentioned are possible, for breakpoints just right click on a breakpoint and select properties, within the dialog tat appears you can then enter a conditional expression and/or a count.

 

For variables just double click on the value in the variables window for that variable and edit the value.

 

For data change breakpoints again just use a count or conditional break in the breakpoint properties.

 

[Edited for better clarity]


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Momentics to Visual Studio... how?

[ Edited ]

Actually, any time I get useful information is a good day.

 

 

It could be that I haven't tried any of those functions since the first Momentics build I used, which was quite an early one. Back then I couldn't find any way to set conditional breakpoints so I didn't try again as Momentics was updated. My bad.

 

As for editing variable values in place, I suspect I was expecting it to work like VS, where you click on the popup text that shows when you hover over the variable name in code during debugging. Speaking of debugging, let's all raise a glass today to Grace Hopper. Sometimes you can have TOO MUCH experience since you need to unlearn a lot when you change platforms or languages. I often have to look up syntax for things I don't use all the time since I can confuse the correct usage of similar functions between C++, C#, Java, JavaScript, PowerBuilder, etc. I've been around so long I even go all the way back to Pascal, Modula2, etc, although I mercifully managed to avoid learning COBOL LOL. I can't remember now if I ever tried changing the value in the variables pane. It seem to me though that that pane wasn't present by default in Momentics 10.0 or 10.1, and that I only saw it by default starting with 10.2. I know I DID try it in the expressions pane, but that didn't work.

 

That said, I still hate eclipse, and Momentics by extension. Apparently QtCreator resolves one of my pet peeves about debugging with Momentics, the inablitiy to see the contents of QVariantMaps, but I haven't tried it yet so I'm not sure.

 

I may find that developing for BB10 is no better in VS or QtCreator, but right now I'm still hoping somebody can suggest an easy way to port projects between all three.


BBSJdev wrote:

Ooh, you're not having a good day to day are you first Zmey corrects you now I'm about to. Smiley Happy

 

All of those missing eclipse functions you mentioned are possible, for breakpoints just click on properties and enter a condition.

 

For variables just double click in the variables window on the value and edit the value.

 

For data change breakpoints again just use a count or conditional break in the properites.

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Momentics to Visual Studio... how?

[ Edited ]

I have the same problem with syntax without the autocomplete I'd be nowhere near as efficient.

 

Actually the floating option works to, but you have to click on the pop-up then double click in the variables value.

 

On the QVariantMap issue I'm convinced there must be a way using a combination of 'Cast to type...' and 'Display as array...' but I usually just resort to qDebug rather than once and for all trying to work it out.

 

8 likes for the person who posts the solution (6 from me, 2 from greenmr). Smiley Happy


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Momentics to Visual Studio... how?

[ Edited ]

Just wanted to report as a follow up to one of my earlier posts in this thread that I have now had the opportunty to test app debugging with QtCreator, and it does indeed allow inspection of key and value in a QVariantMap, as well as deep inspection of complicated arrays. This alone will probably lead me to develop my next app with QtCreator rather than Momentics, which doesn't know how to peek inside a QVariantMap.

 

The latest releases of QtCreator handle BB10 Cascades apps seamlessly, right down to app creation templates, and automatic downloading/installation of BB10 SDKs. There is even an "import from Momentics" function. This is an IDE built from the ground up to develop Qt, rather than just a skin bolted on over eclipse like Momentics, and as such it seems to be a far more elegant and productive solution.

 

And I think I made it pretty clear earlier that I have hated eclipse for a long time. 



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Momentics to Visual Studio... how?

I know this thread is old now, but I dug it up again to ask if I'm just missing something. I tried your suggestion re changing variable values while debugging, and while it works for simple types like pointers and integers, I am unable to edit QStrings or QUrls in the debugger. Unfortunately, these are the most common variable types I want to edit during debug sessions.

 

Am I just missing something?

 


BBSJdev wrote:

Ooh, you're not having a good day to day are you first Zmey corrects you now I'm about to. Smiley Happy

 

All of those missing eclipse functions you mentioned are possible, for breakpoints just right click on a breakpoint and select properties, within the dialog tat appears you can then enter a conditional expression and/or a count.

 

For variables just double click on the value in the variables window for that variable and edit the value.

 

For data change breakpoints again just use a count or conditional break in the breakpoint properties.

 

[Edited for better clarity]






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Momentics to Visual Studio... how?

Modern day debuggers should easily cope with reassignment of memory for variables that require it, sadly though trying to do so on such objects within Momentics results in an error.

 

I know for a fact eclipse can cope with this so it seems to just be a BlackBerry/QNX thang.

 

So in summary, no, you aren't missing anything, it just doesnt work, but should!


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Momentics to Visual Studio... how?

I thought you'd moved on to QTcreator anyway?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Momentics to Visual Studio... how?

Oh ok, I thought from your earlier posts that you were able to modify all your variables in the debugger and that perhaps there was something funny about my setup. Agreed that this seems to be a Momentics issue and not an underlying eclipse problem.

 

It's frustrating because for most of my career I've used either Visual Studio or the IDE built into PowerBuilder, and both of them allow you to manipulate variables seamlessly while debugging.

 

I haven't moved to QtCreator yet, and probably won't for my multiFEED app, although I might do so going forward with new applications. QtCreator has a nice "import from Momentics" feature, but to overcome some limitations of Momentics, I do some fancy footwork where each build type adds a unique include path to the project. This way I can specify an #include in C++ source that resolves to a different file depending on the build configuration. Works perfectly in Momentics, but QtCreator doesn't like it, and taking it out now is a non-trivial undertaking, especially if I ever wanted to migrate back to Momentics.

 

I am still looking into using QtCreator for my next project which I am just starting up, but there are pros and cons for each IDE. QtCreator understands Qt much better than Momentics, and lets you see the contents of QVariants and QVariantLists during debugging. It also lets you manipulate variables during debugging the way that Momentics doesn't. As for Momentics, aside from handling my include path trick properly, it also has the benefit of being what most Cascades developers use, so if (when) I run into trouble I'm more likely to find help in these forums than if I'm using QtCreator. Also, the new live QML updates trick requires Momentics to function, although I have found this feature has some fairly serious limitation that make it really only useful for apps with simple, non-dynamic QML, so this isn't really a deciding factor for me in favour of Momentics.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Momentics to Visual Studio... how?

It's not really momentics... you can see in the console window it is invoking the underlying debugger, using python apparently.
Whether it's missing functionality or a communication problem who knows, probably one for JIRA.

Type it up and I'll upvote it for you. ;-)

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.