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"

Debug on VS not stopping on breakpoints

I'm experienced in C++ and interactive debugging but I can't make this work in UE4. I followed the tutorials around.

  • Set Solution config in VS to Debug Game Editor mode. (I guess it's the new Debug Editor)

  • Set some breakpoints in the code

  • Associate a debugging setion to the UEEditor.exe. (Debug --> Associate. No idea how that is in english)

  • Hit play on the game

Not stopping at all in there, and I know it's executing that. Anything I'm missing here?

[EDIT] Found this. Could this be a problem? https://answers.unrealengine.com/questions/330144/c-breakpoints-works-with-actors-does-not-with-func.html

Product Version: UE 4.15
more ▼

asked May 12 '17 at 11:52 AM in C++ Programming

avatar image

8 1 6 6

avatar image ImVawx ♦♦ STAFF May 12 '17 at 02:45 PM

Are you running from Visual Studio or launching through your .uproject?

avatar image virtual_method May 12 '17 at 03:40 PM

I'm opening VS double clicking my class in the content panel.

avatar image rYuxq May 12 '17 at 07:20 PM

make sure that the line you put your breakpoint in isnt trivial, so it doesnt get optimized out. if you let your function return something, you should be able to put a breakpoint on the opening bracket for your function body definition

avatar image virtual_method May 19 '17 at 08:42 AM

Yeah, as I said, I have enough experience on interactive debugging, so yeah, that's the first thing I tested. Thanks!

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

2 answers: sort voted first

Try to use :

#pragma optimize("", off)


#pragma optimize("", on)

more ▼

answered May 12 '17 at 11:56 AM

avatar image

293 11 8 20

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

Not working!

avatar image mxnko Jul 04 '18 at 04:39 AM

worked for me

avatar image sunk1ller_ Nov 07 '18 at 12:44 PM

and me, cheers!

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

In order to debug with Visual Studio, go to your project folder and open the .sln, by double clicking on it:

alt text

This will open Visual Studio. Make sure on the top bar you have Debug/Development Editor selected. Win64. And the project name should be listed as well (by default). Then press the "Local Windows Debugger" button. This will launch your projects editor, where you can then use PIE to debug through your classes using Visual Studio:

alt text

debugging_00.png (22.4 kB)
debugging.png (10.8 kB)
more ▼

answered May 12 '17 at 06:47 PM

avatar image

ImVawx ♦♦ STAFF
6.8k 114 18 127

avatar image virtual_method May 19 '17 at 08:40 AM

I tried and noticed that when using local windows debugger, the SLN opens a new instance of UE4. But not the latest I have, and older version of it.

Also, I have no field with the name of the project before that green Play button. But the debugger is stopping, so, it's nice!

sin título.png (22.4 kB)
avatar image virtual_method May 19 '17 at 08:41 AM

If you move this comment to be an answer, I'll mark it as answered. Thanks!

(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