Use the Older and Newer buttons to move back and forth in the plan history. As you change the state, you can see values in the graph populated. The notation at the bottom of the plan versions bar indicates the event that most recently modified the plan. In this example, the geo.
BuildPointRadius action an internal action to the Geography library capsule is being used in the execution of the utterance "show me the nearest Thai restaurants". The right side of the Debug Console window displays information about the models and functions used in the query or, if a node in the execution graph is selected, the models and functions used in that node.
The Inspector is itself divided into two panes. The top pane contains a list of stacked sections that expand or collapse when clicked. When expanded, each section displays a result data structure as a tree of key-value pairs and arrays. The size of arrays will be indicated in brackets for example, "results ". The bottom pane is the X-Ray Pane. Click any individual element in the Inspector to display more detailed information about the selected item:.
In this view, results is selected under the dice. RollDice Action. The X-Ray Pane shows that roll is a three-element array the three dice rolled , and sum the total of the dice rolled is 9. Different sections have different displays and functionality, depending on the context of the element being inspected. Concepts and actions display the values of the models being used in the query execution, or at the specific selected node along the execution graph.
All of the values for models can be displayed entirely within the Inspector by expanding their levels in the data structure tree. You can "drill down" in the function section to find the specific error. In this example, viv. FindLocality failed to find a country for the user input "is it raining in helsinki", and displays an EmptyOptionalValue error:. Lastly, you can open the endpoint containing this function directly from the X-Ray Pane by clicking the document icon in the X-Ray Pane to the right of the function name.
Dialogs, like Concepts and Actions, have data structure trees that can be inspected, showing each final dialog output along with the templates and concepts used to construct it. Here's example dialog from a recipe searching capsule, after the user has requested Bixby to find recipes with chicken and tomato, but without rice:. In the X-Ray Pane, the template for the selected utterance the phrase with chicken and tomato is shown, along with the file containing the template, concepts and their bound values, and other metadata. Click on the file path to open the file in Bixby Studio.
The first section available in the layout debugger is a logger, which lists the steps shown in choosing which layouts and view components to present. In this example, you can compare the rendered layout on the right with the debug layout logs on the left. The tree in the Conversation section will show you how Bixby has parsed the user's utterance. Understanding shows the user's natural language input: "roll 3 6-sided dice". Under that, Bixby shows you the goal and concept inputs that it's matched to the natural language.
Interpretation shows how Bixby understands this input. First, it shows the aligned NL:. You can also use the Conversation inspector to display the user context used for processing this user request. Expand the context tree to see the values used. These are device-specific, and might be different when testing on actual devices rather than the simulator. When there's an error in execution, the Debug Console will display information about the problem:. In this case, an error has happened in the RollDice step: the node in the execution graph is red and marked with an X.
Clicking the round crosshairs icon in the upper right corner of the function failure message shows the function generating the issue:. Thus, it may be helpful to include some print statements within your code near the area which you suspect is problematic.
http://passamaquoddyblue.com/map10.php If you prefer a more visual tool, adb also offers a GUI version of adb logcat called monitor. If you're working on a Win32 desktop app, some details on debugging can be located here. If you're working on a macOS desktop app, some details on debugging can be located here. Consider this code:. Without indenting the lines to show the various blocks of code, it's very difficult to read. In fact, there's an error which would be obvious if the code was indented correctly. Compare the difference:. As you can see, there is a missing end keyword for the doSomething function, and this is clearly revealed when the code is properly indented.
Many code editors can help you by automatically indenting code and, when you close a block, it will back out one level and put the end in the correct place. Each operating system has a selection of code editors, and better editors feature Lua syntax highlighting. For a list of recommended editors, please see our installation guides for macOS or Windows.
Another important aspect is naming variables and functions so that you and others know what they mean. Consider these two blocks of code:.
These functions are identical in behavior, but by using clearer variable and function names, most developers can easily figure out what you're trying to accomplish. Some developers are dismayed to find that their project works in the Corona Simulator but not on their actual device. Usually, one of the following factors is at fault:. File names are not case-sensitive. When testing on macOS or Windows, file names are not case-sensitive , but when running on a device, the file names must match in case.
For example, the file name titleimage. PNG are the same in the Corona Simulator, but they are considered different on a device.
There is an error in the build. Please see the Project Build Settings guide for instructions on how to properly construct the build.
The Developer's Guide to Debugging: 2nd Edition [Thorsten Grötker, Ulrich Holtmann, Holger Keding, Markus Wloka] on zeburyjodofo.tk *FREE* shipping on. The Developer's Guide to Debugging [Thorsten Grötker, Ulrich Holtmann, Holger Keding, Markus Wloka] on zeburyjodofo.tk *FREE* shipping on qualifying offers.
There's a problem with a plugin. Each plugin must be included exactly as specified, and several plugins require device permissions in order to function properly. Please see the appropriate plugin documentation for details. In some cases, an event listener function may still be running when you attempt to remove the listener, or a Corona library will be completing an internal process when you attempt to call a certain action. For example, you may attempt to remove a GPS listener while the GPS event is still being processed, or you may try to deactivate a physics body at the exact moment it collides with another object.
The solution to these type of issues is to perform the necessary action after a short timer delay:. If you have exhausted all of the above debugging methods, proceed to the Corona Forums. There you can search for topics which describe the same issue you're struggling with. Note that new contributors will have their first post moderated — these will be entered into the system, but they will not be visible to others until approved by a moderator.
If you cannot locate the solution in any previous forum threads, please post a new request and follow these guidelines:. Do not post the same topic multiple times. Also, choose the most appropriate sub-forum for your topic, and abstain from posting the same topic in multiple sub-forums. Report an Issue. Debugging Guide As a developer, you will occasionally encounter problems in your code, including incorrect logic, improper usage of an API, or any number of other issues.
Using Break Points One key concept in using an interactive debugger is the ability to stop your program at certain points so you can observe the current state. At this point, you have several options: Run — Run the code until the next break point or until completion. Toggle Breakpoint — Turn off the breakpoint or set a new one. Inspect Variable — See Inspecting Variables below. Stop — Stop the program.
Stack Tracing Sometimes it's helpful to know where an error originated from. The line number within that file where the error occurred, for instance Line The reason for the error, such as Attempt to perform arithmetic on a nil value. The stack trace which can help you locate the origin of the error, for example: stack traceback: main. Proceed with the build process and the application will open in a simulated device window.
Device Debugging — iOS Some errors only manifest themselves once you install the app on a device. Fortunately, each device has its own console log which you can access, and for Apple, you can see this console log within Xcode as follows: Open Xcode if it's not already running.
Device Debugging — Android Debugging on Android is a bit more "command line oriented," but once you figure out the commands, it's reasonably quick to install an app, view the log as the app runs, and look for error messages. Simply follow these steps: Visit the download page. To see the entire log, use this command instead: adb logcat This will prevent filtering for Corona-specific activity, but it will generate a large number of messages and it will be difficult to locate those relevant to the problem. Debugging — Win32 Desktop If you're working on a Win32 desktop app, some details on debugging can be located here.
Tips and Common Pitfalls There are some common issues which are usually simple to resolve once you're aware of them. Consider this code: local function doSomething params if params. Compare the difference: local function doSomething params if params. Descriptive Naming Another important aspect is naming variables and functions so that you and others know what they mean. Device Considerations Some developers are dismayed to find that their project works in the Corona Simulator but not on their actual device.
Usually, one of the following factors is at fault: File names are not case-sensitive. Listener Removal In some cases, an event listener function may still be running when you attempt to remove the listener, or a Corona library will be completing an internal process when you attempt to call a certain action. The solution to these type of issues is to perform the necessary action after a short timer delay: local function handleGPS event timer. Community Support Locating Solutions If you have exhausted all of the above debugging methods, proceed to the Corona Forums.
Requesting Assistance If you cannot locate the solution in any previous forum threads, please post a new request and follow these guidelines: Do not post the same topic multiple times. Include enough information so that the community can help. A concise amount of code around the problematic area, if necessary. Whether you are using macOS or Windows. The relevant error messages from your console log. All Rights Reserved. Last updated: Sep Help us help you!