Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to Debug game code?

I'm working on code for an actor class and want to run the debugger through it to see if the functions work properly. Problem for me is I'm still not 100% used to Visual Studio and Unreal, and there are these different solution configurations, namely DebugGame and DebugGame Editor, and I don't know which one would help me with this.

Product Version: UE 4.9
more ▼

asked Oct 16 '15 at 07:59 PM in C++ Programming

avatar image

19 7 7 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Debug and DebugGame works the best with debugging, Editor means it's a editor build without it it's game only, in order for your code module to work in editor you need to do editor build. Also get engine from source and build it in Debug configuration too, you might have a problems if not. Laucher version is "Development" build, you can debug on it to but sometimes it will show strange things when you try to read variable states.

more ▼

answered Oct 16 '15 at 09:17 PM

avatar image

37.3k 936 172 1117

avatar image polomos Oct 23 '15 at 07:39 PM

So when you have breakpoints on some lines DebugGame Editor is what you use when you want to go through them in the editor?

avatar image Matthew J Oct 23 '15 at 09:11 PM

If you want to debug using Visual Studio, you'll need to run the project in Debug through Visual Studio or manually attach Visual Studio to the editor's process. To do this, you can right-click the project in the Solution Explorer and select Debug > Start New Instance. This will take a moment but it'll start the project in the editor. From this point, Visual Studio will be attached to the process itself and display information. If you set a breakpoint beforehand and it reaches that point in the code, it'll immediately stop and Visual Studio will show you the breakpoint's location.

Hope this helps!

avatar image polomos Oct 24 '15 at 01:50 AM

Yeah it helps my problem, but does it always take awhile for it to start?

avatar image Matthew J Oct 26 '15 at 01:53 PM

It should take a few moments for Visual Studio to prepare and then the normal time for the project to launch.

avatar image virtual_method May 12 '17 at 12:09 PM

Start New Instance not available in VS2015. Isn't it attach to process, and hten you select UEEditor.exe?

avatar image Matthew J May 12 '17 at 05:57 PM

alt text

This screenshot is taken inside of Visual Studio 2015, so you should be able to start a debug instance this way. Starting and then attaching works as well however, so either way you would like to do it is fine.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question