Cov txheej txheem:

Kuv yuav ua li cas thiaj li teeb tsa cov ntsiab lus hauv Intellij?
Kuv yuav ua li cas thiaj li teeb tsa cov ntsiab lus hauv Intellij?

Video: Kuv yuav ua li cas thiaj li teeb tsa cov ntsiab lus hauv Intellij?

Video: Kuv yuav ua li cas thiaj li teeb tsa cov ntsiab lus hauv Intellij?
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Kaum ib hlis
Anonim

Rau tsim a conditional breakpoint Kuv tsuas yog txoj nyem rau ntawm qhov breakpoint cim thiab ntaus hauv a mob . ** Cov mob yog ib qho adhoc Java code uas yuav muab tso ua ke hauv cov ntsiab lus ntawm cov breakpoint , thiab xa ib lub Boolean. Yog li kuv tuaj yeem ua qhov ' Qhov xwm txheej 'i==15 then the breakpoint yuav tsum tsuas yog thaum kuv sib npaug 15.

Tsuas yog li ntawd, kuv yuav ua li cas dhia ntawm ib qho kev tawg hauv IntelliJ?

Xaiv cov ntawv qhia zaub mov thiab nyem rau ntawm debug, tam sim no koj daim ntawv thov pib hauv hom kev debug. Tom qab pib daim ntawv thov koj qhov kev ua haujlwm raug ncua thaum thawj zaug breakpoint raug ntaus. Xws li ib breakpoint yog cim nrog ib tug xiav kab txaij. Koj tuaj yeem nias F8 mus rau kauj ruam tom ntej no nqe lus thiab f9 mus rau kauj ruam tom ntej no breakpoint.

Tsis tas li, kuv yuav ua li cas los ntawm cov lej hauv IntelliJ? Qhov no feature tso cai rau koj xaiv txoj kev hu koj xav nyob rau hauv. Los ntawm lub ntsiab zaub mov, xaiv Khiav | Ntse Kauj ruam mus los yog nias Shift + F7. Nyem rau txoj kev los yog xaiv nws siv tus xub yuam sij thiab nias Enter / F7.

Tsis tas li ntawd, koj tso qhov twg los tso tseg?

Rau teeb a breakpoint nyob rau hauv qhov chaws code, nyem rau ntawm sab laug sab laug ntawm ib sab ntawm kab ntawv. Koj tuaj yeem xaiv kab thiab nias F9, xaiv Debug> Toggle Breakpoint , los yog right-click thiab xaiv Breakpoint > Ntxig breakpoint . Cov breakpoint tshwm raws li ib tug liab dot nyob rau sab laug margin.

Kuv yuav tshem tawm tag nrho cov ntsiab lus hauv IntelliJ li cas?

Txhawm rau tshem tawm tag nrho cov breakpoints hauv IntelliJ Idea nias nram qab no ua ntu zus ntawm shortcuts:

  1. Ctrl + Ua haujlwm + F8 (qhib Breakpoints dialog)
  2. Ctrl + A (xaiv tag nrho cov breakpoint)
  3. Alt + Rho tawm (tshem tawm cov ntsiab lus xaiv)
  4. Nkag mus (confirm)

Pom zoo: