https://youtu.be/jzPZInXIOeM
Bom Dia/Boa Tarde/Boa Noite
Esse Ao Vivo vai estrear as 14:00 do dia 04/09/2020
DICAS 3057 -WINDEV TUTORIAL 80 -Licao 6.4-04-09-2020 14Hrs- Debugging a project
Tutoriel WINDEV : Leçon 6.4. Optimiser et déboguer - Débogage d'un projet
ASSUNTOS
O QUE VAMOS APRENDER
USANDO O DEPURADOR
VISAO GERAL
USANDO O DEPURADOR
CTRL + PAUSE , INICIO -> ISSO MUITO LEGAL
CTRL + B , PONTO VERMELHO
F8 PARA CONTINUAR DEBUG
F7 PARA IR PARA OUTRO PROCEDIMENTO
ADICIONANDO EXPRESSAO PARA DEBUG
AUTO STOP
ESTA VERDE, COLOCAR VERMELHO,COLOCAR CONDICAO EXPRESSAO
F6 - executar ate o cursor - MUITO TOP
f5 = SEM INTERRUCAO
AMARILDO DANDO UMA OPINIAO
Video original da Franca
https://youtu.be/AmPOIkl1vMI
Playlist Windev TUTORIAL
Repositorio Windev
https://repository.windev.com/
https://youtu.be/3DshsXJ8I2M
DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C
Lesson 6.4. Debugging a project
Let's take a look at the debugger supplied with WINDEV.
What is the debugger?
The debugger is a powerful tool used to follow the code or application progress, step by step. Enhancing a process or even an application becomes child's play.
We are going to use the debugger on the long process found in the WIN_PerformanceProfiler window.
- To debug the WIN_PerformanceProfiler window:
- Open "WIN_PerformancepRofiler" in the window editor (double-click its name in the "Project explorer" pane).
- Run the test of "WIN_PerformanceProfiler" window ( among the quick access buttons).
- Start the debugger by using one of the following methods:
- Press Ctrl + [Pause]: the debugger will be automatically started during the next user action in the window whose test is run.
- Go back to the WINDEV editor and position a breakpoint in the WLanguage code associated to the Button control "Process to analyze" (click next to the first line of code of the "Click" event or press Ctrl + B; a red dot will appear). The debugger will be automatically started when the line preceded by the breakpoint is run.
Remark
Several methods can be used to start the debugger. See Start modes of debugger for more details.
- Click "Process to analyze". The debugger starts. The current line is preceded by a little arrow.
The "Debugger" pane appears in the lower section of the screen. This pane displays two distinct areas:- the call stack: This area allows you to know the hierarchy of the events and processes displayed in the debugger. In our example, we are currently debugging the event "Click BTN_LongProcess".
- the list of expressions to evaluate. By default, the main variables used in the WLanguage code are displayed in this area. You can add variables in order to follow their evolution (this feature will be presented later).
We are going to perform some operations in the debugger to discover its capabilities.
- First of all, we are going to run the different statements step by step and see the content of variables:
- Press the F8 key (or click the "Step by step" button found in the ribbon). The line following the current line is automatically run. The values of variables are modified (if necessary) in the "Debugger" pane (displayed at the bottom of the screen).
- When the cursor shaped like an arrow reaches the "PROGBAR_Progress..MaxValue = ..." line, hover "PROGBAR_Progress" with the mouse. A tooltip is displayed with the expression value:
- The value of "PROGBAR_Progress..MaxValue" is displayed in a tooltip. This value corresponds to 100 because the code line was not run.
- Press F8 to run the line.
- Hover "PROGBAR_Progress..MaxValue" again. The value of "PROGBAR_Progress..MaxValue" displayed in the tooltip corresponds to the result of HNbRec(Product).
- Let's continue our operations in the debugger. We are now going to run the UpdateProductStock procedure step by step in the debugger.
- To run this procedure step by step, press the F7 key (or click the "Detailed step by step" button in the ribbon).
- The procedure code is displayed in the debugger.
- We are now going to add an expression to monitor the evolution of its value in the "Debugger" pane. This expression can have any type: variable, function, operation on variables, ... The expression result is calculated and displayed.
This expression is used to perform a custom debugging. For example, you can find out the content of a variable while it is being used in the application.
- Press F7 to run the different lines of UpdateProductStock procedure until you reach the line:PROGBAR_Progress++
- Hover "PROGBAR_Progress". The value displayed in the tooltip is 0.
- Select "PROGBAR_Progress" in the code editor and open the popup menu (right click). Select "Add expression to debugger".
- The expression is automatically added into the debugger pane at the bottom of the screen.
- The debugger can also be used to run a set of code lines:
- Press F8 until you reach the line:The F8 key is used to run the code of InterrogateSupplierDatabase procedure without running it step by step in the debugger.HModify(Product)
- Click the following line with the mouse (caution: click inside the line and not in front of it):IF HExecuteQuery(QRY_QuantityOrdered) THEN
- Press the F6 key (or click the "Run until cursor" button found in the ribbon).
- The arrow indicating the line currently run moves until it reaches the code line where the cursor is positioned. The code lines found before the cursor are automatically run.
- Press F8 until you reach the line:
- We are now going to add a breakpoint and to run the code until it reaches the breakpoint:
- Click in the hatched area with the mouse, in front of HModify. A breakpoint (red bullet) appears.
- Press F5 (or click "Continue" in the ribbon). The code is run until it reaches the breakpoint. The arrow used to identify the current line moves until it reaches the breakpoint.
- Click the breakpoint to remove it.
- To end this test, we will be using an "Auto-stop" expression. An "Auto-stop" expression is used to start the debugger as soon as a condition is checked or when the value of a variable is modified. In our example, the debugger will be started as soon as the value of progress bar is set to 50%:
- In the "Debugger" pane, select the "PROGBAR_Progress" expression that was added beforehand.
- Click the green circle.
- Press F5 to continue the test.
- A message is displayed, indicating that the value of "PROGBAR_Progress" expression changed.
- Validate.
- In the "Debugger" pane, select the "PROGBAR_Progress" expression. Click the expression again: the "Expression" column becomes editable. In the "Expression" area, add "=50". You will get "PROGBAR_Progress = 50".
- Press F5. The program continues to run. The debugger is started again when the value of the progress bar is set to 50.
- That's it, the main features of debugger have been presented here. To stop the test in the debugger, click "End the test" found in the ribbon.
Nenhum comentário:
Postar um comentário