Cov txheej txheem:

Kuv yuav ua li cas debug Java code hauv Visual Studio?
Kuv yuav ua li cas debug Java code hauv Visual Studio?

Video: Kuv yuav ua li cas debug Java code hauv Visual Studio?

Video: Kuv yuav ua li cas debug Java code hauv Visual Studio?
Video: Ua Kuv Tus [Original Song] - LBY * Emblem Beats 2024, Kaum ib hlis
Anonim

Tom qab reloading VS Code, qhib lub nplaub tshev uas muaj Javaproject thiab ua raws cov kauj ruam hauv qab no:

  1. Npaj qhov project. Qhib a.
  2. Pib debugging . Hloov mus rau Debug saib (Ctrl + Ua haujlwm + D) thiab qhib lub community launch.
  3. Sau rau hauv mainClass rau Launch teeb lossis hostName thiab portfor Txuas.
  4. Teem koj breakpoint thiab ntaus F5 pib debugging .

Kuj nug, kuv yuav ua li cas debug code hauv Visual Studio code?

Nres lub debugger los ntawm nias lub Stop Kev debugging khawm liab lossis Shift + F5. Right-click ib kab ntawm code hauv koj lub app thiab xaiv Khiav mus rau Cursor. Qhov no commandstarts debugging thiab teem ib ntus breakpoint ntawm kab tam sim no ntawm code . Yog tias koj tau teem caij breakpoints, lub debugger pauses ntawm thawj breakpoint uas ithits.

Tom qab ntawd, lo lus nug yog, ua li cas koj debug Java code? Rau debug koj daim ntawv thov , xaiv a Java ua ntaub ntawv nrog ib txoj kev loj. Right-click rau nws thiab xaiv Debug Raws li Java Application . Yog tias koj pib ib qho daim ntawv thov ib zaug dhau ntawm cov ntawv qhia zaub mov, koj tuaj yeem siv thecreated launch configuration dua ntawm qhov Debug khawm hauv Eclipse toolbar.

Hais txog qhov no, kuv yuav ua li cas debug hauv Visual Studio?

Basic debugging

  1. Txhawm rau pib koj lub app nrog lub debugger txuas, nias F5, xaivDebug> Pib Debugging, lossis xaiv lub xub ntsuab hauv VisualStudio toolbar.
  2. Feem ntau lub qhov rais debugger, zoo li Modules thiab Watch windows, muaj tsuas yog thaum lub debugger khiav.

Koj puas tuaj yeem siv Visual Studio rau Java?

Java hauv Visual Studio Code. Cov Java txhawb hauv Visual Studio Code yog muab los ntawm ntau yam kev txuas ntxiv. Los ntawm kev txhim kho extensions, koj ua tau muaj lub teeb yuag thiab ua tau zoo code editor uas kuj txhawb ntau tus neeg nyiam Java cov cuab yeej tsim kho.

Pom zoo: