Documente Academic
Documente Profesional
Documente Cultură
///
comment for one line
//
comment for block
vs cmd tools : Developer Command Prompt, Debuggable Package Manager, x64 Native
Tools Command Prompt, Cross Tools Command Prompt
autocompelete tip: double tab on items with scissor icon in left side create nested
items
autocompelete tip: double tab on items
show all files in solution explorer->select project and active show all files
unload project
more space and fast navagtion in ui: hide ui:window->auto hide, ctrl+tab
----------------------
-set startup app: solution explorer->rmb on project->set as startup app(bold name)
auto complete
press tab when select item from auto complete menu
-structure:
solutionName\.sln
\projectName\bin\debug\(optimal)
\projectName\bin\relase\(optimal)
\projectName\obj\
\projectName\Properties\
\projectName\.csproj
- find definetion:
cursor over name/click on name + rmb-> + go to difinition/peek difinition(multiple
in one window)
- visual debug and get info from state of each line of code by enhanced scroll bar
green/yellow=saved/unsaved after last changes in this line - orange=find result
blue=current line - gray= line of bookmark - red=error - drak red=breakpoint
change options: tools->options->text editor->c#->scroll bar
-refactoring
1-surround with: select code + rmb->snippets->surround with, examples: try/catch
2-edit->advance->format
3-reorder/remove method's arguments: select method + edit->refactor->reorder
parameter
-help
1-select + f1
2-help viewer insted of browser: help->set help perfernce(i can't find it in 2017)
3-double click errors in erorr list
4-help->sample(i can't find it in 2017)
5-quick lunch
-debuging:
A- first breakpoint: select line of code+f9 or click left side of number line, then
f5
B- then walk in code:
code line by line=step over
inside block(methods)=into(inside block) - over(next line) - out(exit from block)
exit and run code = f5(continue)
C- now examine values:
1-callstack = functions
2- data visualizer :hover cursor over variable to see value in
text/xml/html/json/database format(magnify glass icon)
also we can select and copy value in code view or locals window to text file
3- pin a tip: hover mouse and active pin in righside of popup, now you can see it
always
or while popup is open press ctrl to hide popup and then relase to see it
4- local/auto/watch
local:track variables
auto: same as local, more focuse, show value when step over on next line
watches: same as local/auto, see value by type variable name or rmb on variable in
code view->add watch
5- quick watch/immediate window: see and edit experssions
quick watch: rmb on variable in code view->quick watch
immediate window: type ?var_name or ?var_name+13 to reevulate
6- command window: manage/debug from cmd: ??(quick watch with preset of variables)
of filname.cs open file (fast way)
debug
-add breakpoint programically:
if(System.Diagnostics.Debugger.IsAttached){System.Diagonstics.Debugger.Break();}
debug:type of breakpoint
-conditonal is true:go to breakpoint and stop running when condition be true
-conditonal when changed:
-hit count:go to breakpoint when loops hit specified value
-function:use when we have multiple function with same name but diffrent parameters
and we want to know which one was called!, method 1: place breakpoint on each
function signture
method2: using function breakpoint
-action: print value to output window, when its value change, your message:
{variable name}
debug:watch
debug: immediate: great way to test return value of methods/ assgin new value to
variables/place breakpoint on method's return and call method on immediate window
debug and performance: perfTips: give time to evelate each statment, by compare
these times we can find where code is slow
inteliTrace
no changing in past or future, only current line and when gone to next line you
can't back to last one
- debug
code map(visualize): create map of events
opening
project/soultion: single project/container of multiple project
folder: folecr contain project/solution
website: asp websites
source control: git/team project
file: single file
-lightweight load
09133251687
45270136
45243120
45271126
32650064
32656847
32287139
32724355
09133296523
hod
09133016850
shah nazari - PARDEH
45 - ab
42 - daste/
110 - pardeh
280 - rang
220 - ghabz
370 - keraye
15- hod
masomeh
mASOMEH5364
-----------------------------------------------------------------------------------
------
yellow highligt with yellow arrow: will execute
cntinue: execute code line by line until next breakpoint or end of code
change value in realtime: move yellow arrow to changed line, step over, show values
Diagnostic Tools
Diagnostic Tools, we mean tools that allow you to see historical information (data
collected over time), as opposed to just a single moment in time (like when you are
stopped at a live breakpoint)
diagnostic tools in this window surface information in two complementary ways: by
adding graphs to the timeline in the upper half of the window, and by providing
detailed information in the tabs in the bottom half of the window. Diagnostic tools
use graphs to surface at-a-glance information, and when you see something of
interest you can select a range of time (as described in the next section) to
filter the detailed information in the tabs below
Auto list members on, as that displays a nice dialog with the
complete names of data members listed for you as soon as you start typing
Ctrl + Spacebar
Press and hold Ctrl + Shift + right arrow (or left arrow) (not Shift + right arrow)
just to
move to the right and left of the cursor, selecting entire words
Hold down the Ctrl key while clicking to select an entire word
Hold down the Alt key to select a box of text (Alt + Left Click + Drag).
Alt + Left Click + Drag for selecting a row of text, then typing as well. The
characters you
type will be repeated in rows
Epic Games Launcher is the program that you need to start up the engine itself. It
keeps a
copy of all your projects and libraries in the Library tab
downloading some of the free library packages in the Library | Vault section
Via your local file explorer. Navigate to the root of where your project
is stored, and double-click on the ProjectName.sln file.
ff From UE4, click on File | Open Visual Studio
Logging is extremely important for outputting internal game data. Using log tools
lets you print
information into a handy little Output Log window in the UE4 editor
When coding, we may sometimes want to send some debug information out to the UE log
window. This is possible using the UE_LOG macro. Log messages are an extremely
important
and convenient way to keep track of information in your program as you are
developing it
1. In your code, enter a line of code using the form:
UE_LOG(LogTemp, Warning, TEXT("Some warning message") );
2. Turn on the Output Log inside the UE4 editor to see your log messages printed in
that
window as your program is running.
int intVar = 5;
float floatVar = 3.7f;
FString fstringVar = "an fstring variable";
UE_LOG(LogTemp, Warning, TEXT("Text, %d %f %s"), intVar, floatVar, *fstringVar );
* just before FString variables when using UE_LOG to dereference
the FString to a regular C-style TCHAR pointer