This section uses the Same Game example application to illustrate how to debug Qt Quick applications in the Debug 模式。
For more information about all the options you have, see Debugging Qt Quick Projects .
The Same Game demo shows how to write a game in QML, using JavaScript for all the game logic. Open the demo project in Qt Creator to debug it:
startNewGame()
function is called (1).
The red circle indicates that a breakpoint is now set on that line number.
(
Step Into
) button on the toolbar or press
F11
to step into the code in the stack. The samegame.js file opens in the code editor at the function that starts a new game.
startNewGame()
function, and click
(
Continue
) to hit the breakpoint.