From: Will Budic Date: Tue, 25 Jun 2024 02:09:20 +0000 (+1000) Subject: Added debugging howto instructions for vscode editor. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=6a863c91694136d5b16cab79eab328ea13672ad3;p=PerlCNF.git Added debugging howto instructions for vscode editor. --- diff --git a/tests/template_for_new_test.pl b/tests/template_for_new_test.pl index dc7d27a..3e5e440 100644 --- a/tests/template_for_new_test.pl +++ b/tests/template_for_new_test.pl @@ -1,10 +1,27 @@ #!/usr/bin/env perl -use warnings; use strict; +use warnings; use strict; use Syntax::Keyword::Try; #no critic "eval" -use lib "./tests"; -use lib "./local"; -use lib "./system/modules"; + +### +# To debug in vscode you need the extension LanguageServer and Debuger by Gerald Richter +# the optional Perl Navigator uses also the LanguagerServer but isn't one. +# To debug in vs code the following local use lib ... have to be commented out. +# Do not forget to uncoment them when commiting or using outside of vscode. +# Setup settings.json now too. +# +# Here is LanguageServer settings example for settings.json +# requires full paths for Gerald's extension because it is dumb to reslove this. +# +# "perl.perlInc": [ +# "/home/will/dev_new/PerlCNF/tests", +# "/home/will/dev_new/PerlCNF/system/modules" +# ] +# After that disable all the followin use lib ... statements: +### +use lib "tests"; +use lib "local"; +use lib "system/modules"; require TestManager; my $test = TestManager -> new($0); @@ -16,16 +33,16 @@ try{ # die $test->failed() if not $cnf = CNFParser->new(); $test->case("Passed new instance CNFParser."); - # + # $test-> nextCase(); - # + # - # - $test->done(); + # + $test->done(); # } -catch{ - $test -> dumpTermination($@); +catch{ + $test -> dumpTermination($@); $test -> doneFailed(); }