Cov txheej txheem:

Kuv yuav ua li cas debug PHP hauv atom?
Kuv yuav ua li cas debug PHP hauv atom?

Video: Kuv yuav ua li cas debug PHP hauv atom?

Video: Kuv yuav ua li cas debug PHP hauv atom?
Video: Ua Li Ntawv Tsis Yog - David Yang Ft. Keeneng Vang (Official Lyrics Video) 2024, Kaum ib hlis
Anonim

Yuav pib debugging:

  1. Qhib koj li PHP ua ntaub ntawv hauv atom .
  2. Txav tus cursor mus rau ib txoj kab uas koj xav ua kom tawg, thiab teem caij so los ntawm nias Alt + F9 lossis xaiv Toggle Breakpoint los ntawm Command Palette (ctrl + ua haujlwm + p) lossis php ib - debug zaub mov (Packages -> php ib - debug -> Toggle Breakpoint).

Raws li, kuv yuav ua li cas debug ib cov ntaub ntawv PHP?

Nov yog cov kauj ruam los ua PHP programming:

  1. Tshawb xyuas PHP txuas ntxiv hauv VS Code.
  2. Nruab PHP Debug txuas ntxiv.
  3. Nyem "reload" rov qab VS Code.
  4. Nruab Xdebug.
  5. Tam sim no thaum koj muaj qhov tseeb version, muab tso rau hauv PHP / ext directory.
  6. Tom ntej no, koj yuav tsum tau teeb tsa PHP siv qhov txuas ntxiv thiab tso cai rau kev debugging.

Qhov thib ob, puas yog Atom zoo rau PHP? Los ntawm lub neej ntawd, Atom muab cov peev txheej hloov kho yooj yim thiab txhua yam koj xav tau sau PHP code. Muaj ntau ntau pob ntawv los txuas ntxiv thiab sau ntawv PHP code ntau npaum thiab muab kev txhim kho zoo dua.

Tom qab ntawd, koj yuav ua li cas debug lub atom?

Pib Debugging

  1. Qhib qhov pom kev debug los ntawm nias ctrl + alt + d, xaiv 'Toggle Debugging' los ntawm Command Palette lossis php-debug ntawv qhia zaub mov.
  2. Pib tsab ntawv nrog Xdebug enabled. Yog tias txhua yam teeb tsa kom raug, tag nrho cov kab ntawm cov ntsiab lus tawg yuav raug pom hauv ntsuab, qhia txog kab tam sim no ntawm tsab ntawv.

Dab tsi yog qhov txawv ntawm ncha thiab luam tawm hauv PHP?

Lawv ob leeg yog siv los tso tawm cov ntaub ntawv mus rau qhov screen. Cov sib txawv yog me me: ncha tsis muaj nqi rov qab thaum luam tawm muaj tus nqi rov qab ntawm 1 yog li nws tuaj yeem siv rau hauv kab lus. ncha tuaj yeem siv ntau qhov ntsuas (txawm tias qhov kev siv no tsawg tsawg) thaum luam tawm tuaj yeem ua ib qho kev sib cav. ncha yog marginally sai dua luam tawm.

Pom zoo: