Jump to content

HOT RELOAD WITH DEBUG


Go to solution Solved by LeMo,

Recommended Posts

hello dev's 

i have a big question and i really need an answer while i was on live debug i sow something calls " HOT RELOAD " when i searched on google about it 

i found that i can edit and code while debugging without needing to recompile the whole solution to see the result but when i tried to use it i had an error 

so if that is true how i can use it !! if anyone know how please share it with us i searched for 3 hours and i didn't find a way 

thanks 

  • Love 1

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/
Share on other sites

  • Premium
2 hours ago, DemOnJR said:

This one? 

This is the hidden content, please

No, it's not just debugging on Visual Studio. It's when you change the code while debugging and can see the changes whitout having to re-open the client.

 

https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-enable-and-disable-edit-and-continue?view=vs-2022

  • Metin2 Dev 1
  • Good 1
  • Love 1
  • Love 2
Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166662
Share on other sites

3 hours ago, DemOnJR said:

no 😕

1 hour ago, Intel said:

No, it's not just debugging on Visual Studio. It's when you change the code while debugging and can see the changes whitout having to re-open the client.

 

https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-enable-and-disable-edit-and-continue?view=vs-2022

yes it is, i did all of that tutorial and im still getting error 

https://metin2.download/picture/Heg7HpQMdg0B9ZLP9ayvGvjk6GH44hOs/.png

Hot Reload :  error NEN1014 : 'InstanceBase.cpp' in 'metin2client.exe' was not linked with Edit and Continue enabled. Ensure that the Edit and Continue option (/EDITANDCONTINUE) is not being ignored by the linker at the Error List window.

i tried to search about that error but i didnt find anything useful 

Edited by Metin2 Dev International
Core X - External 2 Internal

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166665
Share on other sites

  • Premium
3 minutes ago, LeMo said:

no 😕

yes it is, i did all of that tutorial and im still getting error 

https://metin2.download/picture/Heg7HpQMdg0B9ZLP9ayvGvjk6GH44hOs/.png

Hot Reload :  error NEN1014 : 'InstanceBase.cpp' in 'metin2client.exe' was not linked with Edit and Continue enabled. Ensure that the Edit and Continue option (/EDITANDCONTINUE) is not being ignored by the linker at the Error List window.

i tried to search about that error but i didnt find anything useful 

https://stackoverflow.com/questions/75745685/visual-studio-editandcontinue-error-nen1014-how-can-i-resolve-this-error

On a whim I would say that maybe some libs need to be recompiled as well with this option (or, there's a conflicting one like mentioned on StackOverflow)

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166666
Share on other sites

28 minutes ago, Intel said:

https://stackoverflow.com/questions/75745685/visual-studio-editandcontinue-error-nen1014-how-can-i-resolve-this-error

On a whim I would say that maybe some libs need to be recompiled as well with this option (or, there's a conflicting one like mentioned on StackOverflow)

still not working i will compile all libs and see, and (/EDITANDCONTINUE) not in the command line too 

are you using hot reload too ?

Quote

/OUT:"..\bin\Debug\metin2client.exe" /MANIFEST /NXCOMPAT /PDB:"Debug\metin2client.pdb" /DYNAMICBASE:NO /MAPINFO:EXPORTS "legacy_stdio_definitions.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /LARGEADDRESSAWARE /DEBUG /MACHINE:X86 /NODEFAULTLIB:"libcmt.lib" /SAFESEH:NO /INCREMENTAL /PGD:"..\bin\Debug\metin2client.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='requireAdministrator' uiAccess='false'" /ManifestFile:"Debug\metin2client.exe.intermediate.manifest" /LTCGOUT:"Debug\metin2client.iobj" /MAP":D:\metin2\marty 5.8\s3ll_client\Srcs\Client\bin\Debug\metin2client.map" /ERRORREPORT:PROMPT /ILK:"Debug\metin2client.ilk" /NOLOGO /LIBPATH:"../../Extern/lib" /ASSEMBLYDEBUG /TLBID:1 

 

Edited by LeMo

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166667
Share on other sites

7 minutes ago, Intel said:

No, I don't use hot reload, I just re-launch the client and cry waiting

i think i saw someone before using it but i dont remember where he was editing something related to inventory window ughh 

Edited by LeMo

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166669
Share on other sites

  • Premium
52 minutes ago, LeMo said:

i think i saw someone before using it but i dont remember where he was editing something related to inventory window ughh 

You sure you not referring to this?

 

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166670
Share on other sites

  • Bot

Right click on UserInterface -> Properties:
C/C++ > General > Debug Information Format: "Program Database for Edit and Continue"
Linker > General > Enable Incremental Linking: "Yes /INCREMENTAL"

Linker -> Debugging -> (you don't need all of them but I like to activate all of them 🤣)
     Generate Debug Information: FULL
     Generate Map File: Yes
     Map Exports: Yes
     Debuggable Assebly: Yes

Also in the Debugging tab set Working Directory with the directory of your client. 

All is set. Now you only have to run the client from "Local Windows Debugger" and have fun.

  • Metin2 Dev 1
  • Good 1

english_banner.gif

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166671
Share on other sites

2 hours ago, Mali said:

I think this is: 

 

 

Mali you are my savior yes this what im talking about its keep giving me that error when i try to use hot reload so can you please tell me how i can fix that 

3 hours ago, Abel(Tiger) said:

Right click on UserInterface -> Properties:
C/C++ > General > Debug Information Format: "Program Database for Edit and Continue"
Linker > General > Enable Incremental Linking: "Yes /INCREMENTAL"

Linker -> Debugging -> (you don't need all of them but I like to activate all of them 🤣)
     Generate Debug Information: FULL
     Generate Map File: Yes
     Map Exports: Yes
     Debuggable Assebly: Yes

Also in the Debugging tab set Working Directory with the directory of your client. 

All is set. Now you only have to run the client from "Local Windows Debugger" and have fun.

thank you for replying but that not what i mean i mean what Mali did in the video when you are in debugging mode you can edit something while debug is running and no need to compile again to see what you did 

Edited by LeMo

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166674
Share on other sites

20 minutes ago, Abel(Tiger) said:

That’s exactly what I gave you. You just don’t know how to use it so I think it’s best you don’t use it 😂

https://learn.microsoft.com/en-us/visualstudio/debugger/hot-reload?view=vs-2022

im getting this error i did all what i found and what you say and still getting this error

Hot Reload :  error NEN1014 : 'InstanceBase.cpp' in 'metin2client.exe' was not linked with Edit and Continue enabled. Ensure that the Edit and Continue option (/EDITANDCONTINUE) is not being ignored by the linker at the Error List window.

 

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-166678
Share on other sites

  • 4 weeks later...
  • Solution

okaaaaayyyy after searching for long time i did it in the end it was not just enabling 

C/C++ > General > Debug Information Format: "Program Database for Edit and Continue"
Linker > General > Enable Incremental Linking: "Yes /INCREMENTAL"

it require another edit in options so im not going to share it here because there is a lot of things to edit 

and i do not have time for that right now if i got time i will open new topic for it 

so if anyone wants to use it feel free to PM or send message on discord and i will help  

thanks for everyone tried to help

  • muscle 1

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167058
Share on other sites

  • 1 month later...

You want to fix the error: 

Hot Reload: error NEN1014: 'InstanceBase.cpp' in 'metin2client.exe' was not linked with Edit and Continue enabled. Ensure that the Edit and Continue option (/EDITANDCONTINUE) is not being ignored by the linker in the Error List window.

No problem, I’ll show you how to do that.

Watch the video to solve the problem, and for any inquiries I am at your service. Enjoy everyone. 

My Discord: 89_

This is the hidden content, please

  • Metin2 Dev 14
  • Good 3
  • Love 1
  • Love 5
Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167831
Share on other sites

On 11/1/2024 at 3:54 PM, xRooT said:

You want to fix the error: 

Hot Reload: error NEN1014: 'InstanceBase.cpp' in 'metin2client.exe' was not linked with Edit and Continue enabled. Ensure that the Edit and Continue option (/EDITANDCONTINUE) is not being ignored by the linker in the Error List window.

No problem, I’ll show you how to do that.

Watch the video to solve the problem, and for any inquiries I am at your service. Enjoy everyone. 

My Discord: 89_

This is the hidden content, please

Hi, I did the same way, but have this 

🔎 Detected changes to 'PythonPlayer.cpp' in 'metin2client.exe' for recompilation...
⚙️ Building changes...
PythonPlayer.cpp
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) : ⚠️ warning C4657 : expression involves a data type that is new since the latest build
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) : ❌ error C1092 : Edit and Continue does not support changes to data types; build required
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) : ❌ error C2418 : cannot delete browser file: C:\Users\Administrator\source\repos\Client\UserInterface\Debug\PythonPlayer.sbr
Project : ❌ error ❌ : Build errors occurred.
❌ Build has completed

Any idea what could I did wrong? I understand what that fault mean, but for you it is working. Didn't tried with something else for now 

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167922
Share on other sites

11 hours ago, bennq said:

Hi, I did the same way, but have this 

 Detected changes to 'PythonPlayer.cpp' in 'metin2client.exe' for recompilation...
 Building changes...
PythonPlayer.cpp
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  warning C4657 : expression involves a data type that is new since the latest build
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  error C1092 : Edit and Continue does not support changes to data types; build required
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  error C2418 : cannot delete browser file: C:\Users\Administrator\source\repos\Client\UserInterface\Debug\PythonPlayer.sbr
Project :  error  : Build errors occurred.
 Build has completed

Any idea what could I did wrong? I understand what that fault mean, but for you it is working. Didn't tried with something else for now 

Change all to Edit and Continue

with cryptlib to Edit and Continue and rebuild all

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167927
Share on other sites

8 hours ago, xRooT said:

Change all to Edit and Continue

with cryptlib to Edit and Continue and rebuild all

Whole solution changed to edit and continue, cryptlib too, libjpeg done, rebuild done, but now this

🔎 Detected changes to 'PythonPlayer.cpp' in 'metin2client.exe' for recompilation...
⚙️ Building changes...
Recompiling 'PythonPlayer.cpp'...
Working directory: 'C:\Users\Administrator\source\repos\Client\UserInterface'
Command: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x86\CL.exe" @"c:\users\administrator\source\repos\client\userinterface\debug\\encClResponseFile.rsp" "PythonPlayer.cpp"
Response file contents: -c -IC:\Users\Administrator\source\repos\Extern\include -ZI -nologo -W3 -WX- -diagnostics:column -MP -Od -Oy- -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -D_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS -D_DEBUG -D_WINDOWS -DUSE_LOD -D_VC80_UPGRADE=0x0710 -D_MBCS -Gm- -EHs -EHc -RTC1 -MTd -GS -fp:precise -Zc:wchar_t -Zc:forScope -Zc:inline -std:c++20 -Yustdafx.h -FpC:\Users\Administrator\source\repos\Client\UserInterface\Debug\UserInterface.pch -FoC:\Users\Administrator\source\repos\Client\UserInterface\Debug\ -FdC:\Users\Administrator\source\repos\Client\UserInterface\Debug\metin2client.pdb -FRC:\Users\Administrator\source\repos\Client\UserInterface\Debug\ -external:W3 -Gd -TP -analyze- -FC -errorreport:prompt -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\atlmfc\include" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\UnitTest\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\atlmfc\include" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" -external:I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\UnitTest\include" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" -external:I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" -external:I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um" -X /ZX
PythonPlayer.cpp
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1899) : ⚠️ warning C4657 : expression involves a data type that is new since the latest build
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1899) : ❌ error C1092 : Edit and Continue does not support changes to data types; build required
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1899) : ❌ error C2418 : cannot delete browser file: C:\Users\Administrator\source\repos\Client\UserInterface\Debug\PythonPlayer.sbr
Project : ❌ error ❌ : Build errors occurred.
❌ Build has completed

I tried different options, but without luck. However thanks for help, Maybe in few days I will try to run it

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167944
Share on other sites

 

22 hours ago, bennq said:

Hi, I did the same way, but have this 

 Detected changes to 'PythonPlayer.cpp' in 'metin2client.exe' for recompilation...
 Building changes...
PythonPlayer.cpp
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  warning C4657 : expression involves a data type that is new since the latest build
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  error C1092 : Edit and Continue does not support changes to data types; build required
C:\Users\Administrator\source\repos\Client\UserInterface\PythonPlayer.cpp(1900) :  error C2418 : cannot delete browser file: C:\Users\Administrator\source\repos\Client\UserInterface\Debug\PythonPlayer.sbr
Project :  error  : Build errors occurred.
 Build has completed

Any idea what could I did wrong? I understand what that fault mean, but for you it is working. Didn't tried with something else for now 

spacer.png

 

And in cryptlib source set "Program Database for Edit And Continue (/ZI)
and rebuild all

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-167945
Share on other sites

On 11/5/2024 at 10:31 PM, xRooT said:

 

spacer.png

 

And in cryptlib source set "Program Database for Edit And Continue (/ZI)
and rebuild all

Yes. I did it everywhere, but still doesnt work

Quote

Whole solution changed to edit and continue, cryptlib too, libjpeg done, rebuild done, but now this

🔎 Detected changes to 'PythonPlayer.cpp' in 'metin2client.exe' for recompilation...
⚙️ Building changes...
PythonPlayer.cpp
F:\Metin2Server\Pliki do instalacji\instalacja\Klient\Source Client  5.8\s3ll_client\Srcs\Client\UserInterface\PythonPlayer.cpp(1899) : ⚠️ warning C4657 : expression involves a data type that is new since the latest build
F:\Metin2Server\Pliki do instalacji\instalacja\Klient\Source Client  5.8\s3ll_client\Srcs\Client\UserInterface\PythonPlayer.cpp(1899) : ❌ error C1092 : Edit and Continue does not support changes to data types; build required
Project : ❌ error ❌ : Build errors occurred.
❌ Build has completed

Here conf

cryptlib

userinterface

userinterfacelinker

userinterfacelinkerdebug

 

Here are steps(what I did)

Spoiler

////////////////////////////////////////////
///////////cryptlib-Debug.lib///////////////
////////////////////////////////////////////
#Go to Patch of repos -> C:\Patch\To\Repo\Extern\cryptopp\cryptlib.sln
>>Properties -> "Program Database for Edit and Continue"
>>Compile as 'Debug'
////////////////////////////////////////////
////////////////////////////////////////////
////////////////////////////////////////////

////////////////////////////////////////////
///////////////HOT RELOAD///////////////////
////////////////////////////////////////////
>>Go UserInterface -> Properties -> Configuration Properties -> Debugging
>>Working Directory(Client directory)
>>C/C++ > General > Debug Information Format: "Program Database for Edit and Continue"
>>Linker > General > Enable Incremental Linking: "Yes /INCREMENTAL"
>>Install CMake and NASM
##############################################################################################
#>>Press Windows Key + R, type sysdm.cpl, and press Enter.                                   #
#>>Go to the Advanced tab and click Environment Variables.                                   #
#>>Under System variables, find the Path variable, select it, and click Edit.                #
#>>Click New and add the path to your CMake bin directory (e.g., C:\Program Files\CMake\bin).#
#>>Click OK to close all dialogs and apply the changes.                                      #
##############################################################################################
>>git clone

This is the hidden content, please
 << In WindowsPowerShell
#CMAKE 3.30.5
>>build in /%pathTolibjpeg-turbo%/build
>>Configure -> Yes -> Optional platform for generator => Win32
Configure>>Generate
##################################################
#In WindowsPowerShell#############################
#cd \pathTolibjpeg-turbo%\libjpeg-turbo\build#####
#cls##############################################
##################################################
cmake .. -DBUILD_SHARED_LIBS=ON  <-------------- 1
-
cmake .. -DBUILD_SHARED_LIBS=OFF
##################################################
cmake .. -DCMAKE_BUILD_TYPE=Release
-
cmake .. -DCMAKE_BUILD_TYPE=Debug <------------- 2
##################################################
cmake --build . --config Release
-
cmake --build . --config Debug    <------------- 3
##################################################

Go to /Build/Debug
>> Copy jpeg62.dll to client root directory
>> Copy jpeg62.pdb to client Extern/lib
>> Rename libjpeg-MTd.lib to libjpeg-MTd-OLD.lib
>> Copy jpeg.lib   to client Extern/lib 
>> Rename jpeg.lib to libjpeg-MTd.lib
>>VisualStudio -> UserInterface -> Properties -> Linker -> Command Line => Remove /LTCG
>>VisualStudio -> Rebuild Solution

 

Edited by bennq
  • Good 2
Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-168014
Share on other sites

  • 4 weeks later...
  • Active+ Member
On 9/17/2024 at 11:38 PM, LeMo said:

okaaaaayyyy after searching for long time i did it in the end it was not just enabling 

C/C++ > General > Debug Information Format: "Program Database for Edit and Continue"
Linker > General > Enable Incremental Linking: "Yes /INCREMENTAL"

it require another edit in options so im not going to share it here because there is a lot of things to edit 

and i do not have time for that right now if i got time i will open new topic for it 

so if anyone wants to use it feel free to PM or send message on discord and i will help  

thanks for everyone tried to help

"searching for long time"... lmao this is literally the first thing thats all over microsoft help page about hot reload. read the docs bros, they have everything

Link to comment
https://metin2.dev/topic/32909-hot-reload-with-debug/#findComment-168518
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.