{"id":1143,"date":"2022-12-04T10:41:07","date_gmt":"2022-12-04T01:41:07","guid":{"rendered":"https:\/\/colory-games.net\/site\/?p=1143"},"modified":"2023-11-04T16:07:40","modified_gmt":"2023-11-04T07:07:40","slug":"ue5-debug_packaged_project-en","status":"publish","type":"post","link":"https:\/\/colory-games.net\/site\/en\/ue5-debug_packaged_project-en\/","title":{"rendered":"[UE5] Debugging Packaged Projects"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><p>Packaging an Unreal Engine project allows you to run the application you created for the target platform.<br>\nPackaging a project includes the optimization and the transformation of the data format for the target platform.<br>\nTherefore, we sometimes face with the problem when packaged on these phases.<br>\nYou can debug in the editor, by simply creating a C++ project and selecting &quot;DebugGame Editor.<br>\nHowever, we can not follow same method for the packaged projects.<\/p>\n<p>This article explains how to debug packaged projects by using Visual C++.<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#Prerequirement\">Prerequirement<\/a><\/li><li><a href=\"#Procedure\">Procedure<\/a><\/li><li><a href=\"#Summary\">Summary<\/a><\/li><\/ul><\/div>\n<h1><span id=\"Prerequirement\">Prerequirement<\/span><\/h1>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Unreal Engine Version<\/td>\n<td>5.1<\/td>\n<\/tr>\n<tr>\n<td>OS<\/td>\n<td>Windows<\/td>\n<\/tr>\n<tr>\n<td>Target Platform<\/td>\n<td>Windows<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1><span id=\"Procedure\">Procedure<\/span><\/h1>\n<p><div class=\"step-group\"><\/p>\n<p><div class=\"step-title\">\nCreate C++ Project\n<\/div><\/p>\n<p>Right click on the Unreal Engine project file (the <code>.uproject<\/code> file) and execute [Generate Visual Studio project files].<br>\nOpen the Visual C++ solution file (<code>.sln<\/code> file) and build the project.<br>\nAt this time, select [DebugGame Editor] for the solution configuration.<\/p>\n<p>To create a C++ project, please also refer to the following article.<\/p>\n<p>\r\n  <div class=\"blogcard\">\r\n    <div class=\"blogcard__left\">\r\n      <a href=\"https:\/\/colory-games.net\/site\/en\/ue_start_cpp-en\/\" target=\"_blank\" class=\"blogcard__link\">\r\n        <div class=\"blogcard__thumbnail\">\r\n          <figure><\/figure>\r\n        <\/div>\r\n      <\/a>\r\n    <\/div>\r\n    <div class=\"blogcard__right\">\r\n      <a href=\"https:\/\/colory-games.net\/site\/en\/ue_start_cpp-en\/\" target=\"_blank\" class=\"blogcard__link\">\r\n        <div class=\"blogcard__title\">[UE5] How to Introduce C++<\/div>\r\n      <\/a>\r\n      <div class=\"blogcard__excerpt\">This article explains how to introduce C++ in the Unreal Engine and how to add C++ header and source files (C++ classes).  <\/div>\r\n    <\/div>\r\n  <\/div>\r\n  <\/p>\n<p><div class=\"step-title\">\nConfigure Project Packaging Settings\n<\/div><\/p>\n<p>Open your Unreal Engine project file.<br>\nClick on [Platforms] at the top of the screen and navigate to [Windows] in the menu.<br>\nFrom the menu item [BINARY CONFIGURATION], select [DebugGame].<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/configure_package_project.png?ssl=1\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/configure_package_project.png?ssl=1\" alt=\"Configuration for Packaging Project\" data-recalc-dims=\"1\"><\/a><\/p>\n<p><div class=\"step-title\">\nPackage Project\n<\/div><\/p>\n<p>Click on [Platforms] at the top of the screen and navigate to [Windows] in the menu.<br>\nFrom the [CONTENT MANAGEMENT] menu, select [Package Project].<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/package_project.png?ssl=1\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/package_project.png?ssl=1\" alt=\"Package Project\" data-recalc-dims=\"1\"><\/a><\/p>\n<p>A window will open to specify where to save the generated files after the build.<br>\nOnce the location is specified, the project start packaging.<br>\nIf the project is successfully packaged, an executable file <code>Windows\/DebugPackagedProject\/Binaries\/Win64\/-Win64-DebugGame.exe<\/code> will be generated.<\/p>\n<p>If the build fails, an error message will appear in the [Output Log], so check and fix the error.<\/p>\n<p><div class=\"step-title\">\nRun the Executable File\n<\/div><\/p>\n<p>Run the executable file generated by the project packaging will launch the application.<\/p>\n<p><div class=\"step-title\">\nAttach to the Application Process\n<\/div><\/p>\n<p>Attach to the process of the launched application.<br>\nOpen the Visual C++ solution file and run [Debug] &gt; [Attach to Process].<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/attach_to_process_1.png?ssl=1\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/attach_to_process_1.png?ssl=1\" alt=\"Attach to the Process Step 1\" data-recalc-dims=\"1\"><\/a><\/p>\n<p>A new window will be created.<br>\nSelect the name of the process you want to attach.<br>\nThe name of the process is the same as the name of the executable file.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/attach_to_process_2.png?ssl=1\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/attach_to_process_2.png?ssl=1\" alt=\"Attach to the Process Step 2\" data-recalc-dims=\"1\"><\/a><\/p>\n<p><div class=\"step-title\">\nDebugging\n<\/div><\/p>\n<p>Once the process is attached, you can debug on Visual C++.<br>\nYou will be able to debug by using breakpoints and so on.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/debug_game.png?ssl=1\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/debug_game.png?ssl=1\" alt=\"Debugging\" data-recalc-dims=\"1\"><\/a><\/p>\n<p><\/div><\/p>\n<h1><span id=\"Summary\">Summary<\/span><\/h1>\n<p>This article explained how to debug a packaged project.<br>\nWe can often see that the behavior will be changed after packaging even for the same implementation.<br>\nIf we implement by using C++, the packaged application sometimes does not work correctly.<br>\nAlso, debugging the packaged application is difficult.<br>\nWe hope that this article will help you to improve the efficiency of debugging packaged applications.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The way to debug on the editor was to simply create a C++ project and select &#8220;DebugGame Editor&#8221;.<br \/>\nHowever, packaged projects do not work this way.<\/p>\n<p>This article explains how to debug packaged projects using Visual C++.<\/p>\n","protected":false},"author":2,"featured_media":1053,"comment_status":"open","ping_status":"open","sticky":false,"template":"templates\/single-home-techblog.php","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[154,71],"tags":[158,122],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/colory-games.net\/site\/wp-content\/uploads\/tech-blog\/nutti\/2022\/12\/20221204\/debug_game.png?fit=590%2C362&ssl=1","_links":{"self":[{"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/posts\/1143"}],"collection":[{"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/comments?post=1143"}],"version-history":[{"count":2,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/posts\/1143\/revisions"}],"predecessor-version":[{"id":1146,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/posts\/1143\/revisions\/1146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/media\/1053"}],"wp:attachment":[{"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/media?parent=1143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/categories?post=1143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/colory-games.net\/site\/wp-json\/wp\/v2\/tags?post=1143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}