输出停靠栏

输出停靠栏

When you open a project in GameMaker Studio 2 for the first time, you will be presented with the Output Dock at the bottom of the screen. This docked window contains various tabs that show the different output information for your project, depending on certain circumstances. The dock can be closed by clicking the button at the bottom of the IDE, and you can click and drag any tab in the docked window to another dock to change its position, or you can click on the dock contents bar and drag it into the workspace to create a stand-alone window:

输出停靠栏

You can also and drag a docked output into another one to create a split view output window, as shown in the example below where the two error outputs have been placed within the same tab (you can slow click on a tab to change its name too):

Split Output Window

You can recover the default state of the IDE at any time by selecting Reset Layout from the Layouts Window. The default docked tabs are explained below:


输出

The egenral Output window is where all compiler output is shown, as well as any messages that you may have added to your game using the show_debug_message function. Most of the initial information shown is simply debug information on how the game is being built and as such can generally be ignored. However if you have an issue building your project for a target platform it can prove helpful in finding the cause as well as provide information for Support should you contact them. Note that you can change the quantity of information shown here from the Compiling section of the Preferences.


搜索结果

You can open the Search And Replace Window using the keyboard shortcut + + "F", or go to the Edit Menu. Once you have entered your search terms, the results will be shown in this window with the format:

[object] - [event] - [Line Number]: [search string]

If the search term is found in a script then it will simply be:

[script] - [Line Number]: [search string]

You can then double-click on any of the returned entries to open the given asset at the correct position for editing.


源码控制

This window will show all the output for your SCM plugin. You can find out more about setting up Source Control here.


断点

Breakpoints are places in your game code or DnD™ where you have instructed GameMaker Studio 2 to pause the running of the project while in Debug Mode. You can add a breakpoint anywhere in the game loop using the key "F9", and when you do it will appear in this output tab. You can enable and disable them (without removing them) by clicking on the checkbox to the left and if you use the right mouse button on one then you get a small menu that permits you to remove the breakpoint or open the code/DnD™ window where the breakpoint is located.


编译错误 语法错误

There are times when your game will encounter some type of error that the syntax checker may not have been able to detect, or that is related to how you have set up the compile options. When this happens, your game will show you a Syntax Error or a Compiler Error (or both) and stop running. Any compiler errors will be shown in the General Output window too, but they will also be listed here separately (since they can get "lost" in the rest of the general output), and syntax errors will update as you write your code (note that there will be a short pause between typing something and any errors appearing in this window to prevent errors being reported for unfinished code).

The compiler error messages will all follow the same format:

[object] - [event] - [Line Number]: [error string]

If the search term is found in a script then it will simply be:

[script] - [Line Number]: [error string]

You can then double-click on any of the compiler or syntax error entries to open the given asset at the position flagged as giving the error. For a full list of possible error messages, please see here.