예상한 버그 근처의 중단점을 설정하고 앱을 실행한 다음 디버거를 사용하여 버그를 파악합니다.
개발 세션이 실행되는 동안(디버거가 아직 연결된 동안) 버그를 수정합니다. 이제 문제가 수정되었는지 확인해야 합니다.
빌드 및 배포 트리거 버튼을 클릭하거나 Mac OS에서 Option+Cmd+Comma 또는 Window에서 Ctrl+Alt+Comma(기본 키 바인딩)를 눌러 Cloud Code 및 Skaffold에 애플리케이션을 다시 빌드하고 다시 배포하라고 전달하는 주문형 모드를 트리거합니다.
알림이 표시되고 다음 확인 메시지가 표시됩니다. '변경사항을 재배포하면 디버거가 중지되고 다시 연결되어 현재 디버그 상태가 손실될 수 있습니다.' 작업을 취소 또는 계속하거나 다시 알림이 표시되지 않도록 선택할 수 있습니다.
계속을 클릭하면
디버거가 종료됩니다.
애플리케이션이 다시 빌드되고 다시 배포됩니다.
디버거가 다시 연결됩니다.
이제 변경사항을 확인하고 필요에 따라 다시 디버깅할 수 있습니다.
지원 받기
IntelliJ IDE에서 의견을 제출하거나 문제를 신고하려면 도구 > Cloud Code > 도움말 / 정보 > 의견 제출 또는 문제 신고로 이동하여 GitHub에 문제를 신고합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCloud Code's watch mode allows for rapid application changes during development or debugging, offering a faster feedback loop in Kubernetes and emulated Cloud Run sessions.\u003c/p\u003e\n"],["\u003cp\u003eWatch mode can be set to "On demand," where manual triggering is required via the "Trigger Build and Deploy" button or specified keyboard shortcuts, or "On file save" for automatic rebuilds and redeploys when changes are saved, though the latter is unavailable in debug mode.\u003c/p\u003e\n"],["\u003cp\u003eThe "Trigger Build and Deploy" function, which defaults to \u003ccode\u003eOption+Cmd+Comma\u003c/code\u003e on Mac OS and \u003ccode\u003eCtrl+Alt+Comma\u003c/code\u003e on Windows, can have custom key bindings configured in the IDE's Keymap settings.\u003c/p\u003e\n"],["\u003cp\u003eWhen debugging with "On demand" mode, triggering a rebuild and redeploy will terminate and reattach the debugger, and a prompt will appear to confirm this action before proceeding.\u003c/p\u003e\n"],["\u003cp\u003eUsing watch mode, a developer can fix a bug during a debug session, trigger a rebuild and redeployment, then reattach the debugger to verify changes without restarting the application manually.\u003c/p\u003e\n"]]],[],null,["# Watch modes in Cloud Code for IntelliJ\n\nCloud Code allows you to quickly apply changes to your application during\na development or debug session for a faster feedback loop. This lets you run your Kubernetes and\nemulated Cloud Run sessions in *watch mode*.\n\nTo learn more about how deployment works, please see the\n[Skaffold documentation.](https://skaffold.dev/docs/workflows/dev/#file-watcher-and-watch-modes)\n\nSettings for Kubernetes and Cloud Run configurations\n----------------------------------------------------\n\nYou can configure watch mode in the Cloud Code Kubernetes and Cloud Run configurations at **Run** \\\u003e **Edit configurations** on the **Run** tab:\n\n### Customizing the Trigger Build and Deploy keymap\n\nThe default key bindings for **Trigger Build and Deploy** are:\n\n- Mac OS: `Option+Cmd+Comma`\n- Windows: `Ctrl+Alt+Comma`\n\nTo change the default key bindings:\n\n1. Navigate to **Preferences** \\\u003e **Keymap**.\n2. In the Keymap search bar, enter \"trigger build and deploy\".\n3. Right-click the Trigger Build and Deploy search result and select **Add Keyboard Shortcut**.\n4. Enter shortcut combination you prefer (for example, `Shift+R`) and click **OK** , then click **OK** in the Preferences window. This adds your new key binding to the Trigger Build and Deploy function, so that both the default and your new key binding will work.\n5. You can also remove the default key binding by right-clicking the Trigger Build and Deploy search result and selecting the **Remove** option.\n\nApplying changes while debugging\n--------------------------------\n\nWith Cloud Code, you can debug an application while making changes to, and\niterating on, source code. This is available for Kubernetes development and Cloud Run local\ndevelopment.\n| **Note:** Certain runtimes support other modes of live updating; for example, Java and HotSwap over JDWP. HotSwap, while limited by the types of changes supported, maintains your debugger state. This design, which operates over [Skaffold](/skaffold) debug, assumes the debugger will be destroyed and reattached on change. These other modes of updating code will continue to be supported independently.\n\nTo apply changes to your code while debugging, perform the following:\n\n1. Ensure On-demand mode is enabled in **Run** \\\u003e **Edit Configurations** (the default option).\n2. Launch the run configuration in debug mode by clicking **Debug**.\n\n### Common use case\n\nThis section outlines a common scenario of how you can debug with watch mode enabled in your IDE.\n\n\n#### Debugging a Kubernetes application with watch mode enabled\n\nYou're a developer building an application that runs on Kubernetes, and use Cloud Code to iterate on your app. You discovered a bug in your code.\n\n1. You launch the Develop on Kubernetes run configuration, and:\n 1. Select **On demand** to rebuild and redeploy the app.\n 2. Launch the run configuration in debug mode by clicking **Debug**.\n2. You set a breakpoint near the expected bug, launch the app, and use the debugger to figure out what the bug is.\n3. You fix the bug while the development session is still running (the debugger is still attached). You now want to confirm that the issue is fixed.\n4. You trigger On-demand mode which tells Cloud Code and [Skaffold](/skaffold) to rebuild and redeploy the application, by clicking **Trigger Build and Deploy** or pressing `Option+Cmd+Comma` on Mac OS or `Ctrl+Alt+Comma` on Windows (the default key bindings).\n5. A notification appears and asks you to confirm: \"Redeploying your changes will cause the debugger to be stopped and reattached, potentially losing your current debug state\". You have the option to either cancel, continue, or to never be notified again.\n6. After clicking **continue**:\n - The debugger is terminated\n - The application is rebuilt and redeployed\n - The debugger is reattached\n7. You can now verify the changes and debug again as needed.\n\nGet support\n-----------\n\nTo submit feedback or report an issue in your IntelliJ IDE, go to **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit\nfeedback or report an issue** to report an issue on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues)."]]