I just discovered that the executable is created using -ldflags -H=windowsgui.
Because of that, I need to pipe to out-text in a PowerShell to see Println 
output but that doesn’t show the panics.
If I remove the flags, then I can see all the output.  I don’t know if they are 
absolutely needed so I may not be able to remove them.
I tried a few “windows” calls to setup a console for when built with the flags. 
 Nothing worked so far.
And, I know I may need to move to a later version of Go to get better help.  
That will need some discussion with others on my team.

Thanks!


--
Thom Bentley | Senior Software Engineer |Medidata, a Dassault Systèmes company
thom.bent...@3ds.com


From: <golang-nuts@googlegroups.com> on behalf of "jake...@gmail.com" 
<jake6...@gmail.com>
Date: Friday, March 1, 2024 at 8:09 AM
To: golang-nuts <golang-nuts@googlegroups.com>
Subject: [go-nuts] Re: How to have panic messages show in a PowerShell console

FWIW, in a very simple test on Windows 10 in a powershell console, running a go 
executable built with go1. 19 prints the panic just like in a regular cmd 
console. On Wednesday, February 28, 2024 at 3: 20: 55 PM UTC-5 Thom BENTLEY 
wrote: Hi All,

FWIW,  in a very simple test on Windows 10 in a powershell console, running a 
go executable built with go1.19 prints the panic just like in a regular cmd 
console.
On Wednesday, February 28, 2024 at 3:20:55 PM UTC-5 Thom BENTLEY wrote:
Hi All,

OS: Windows 10
GoLang: go1.6.3 windows/386

I am trying to have a go executable run and show the panics it causes in the 
PowerShell console.

I think I can use GODEBUG, but all the examples I've seen so far are for Linux.
I've set that variable to paniclog=1, but nothing changed.

If I run go env, I don't see GODEBUG listed.
Thanks in advance.


________________________________
The information in this email and any attachments are intended solely for the 
recipient(s) to whom it is addressed, and may be confidential and/or 
privileged. Any unauthorized distribution or copying of this transmittal or its 
attachments is prohibited. If you are not a named recipient or have received 
this email in error: (i) you should not read, disclose, or copy it, (ii) please 
notify the sender of your receipt by reply email and delete this email and all 
attachments.
--
You received this message because you are subscribed to a topic in the Google 
Groups "golang-nuts" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/golang-nuts/EIkq7hxS9DI/unsubscribe<https://urldefense.com/v3/__https:/groups.google.com/d/topic/golang-nuts/EIkq7hxS9DI/unsubscribe__;!!FbCVDoc3r24SyHFW!7OCUDZAskQEe1lPthPrEjJPqyNukdV72ZroNmQMPVsAvCtTRypeZRlC10iKSxRO3QiThjhwgVatrIwo$>.
To unsubscribe from this group and all its topics, send an email to 
golang-nuts+unsubscr...@googlegroups.com<mailto:golang-nuts+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/53c4fa69-32cd-4111-a0d5-d545d9851bf8n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/golang-nuts/53c4fa69-32cd-4111-a0d5-d545d9851bf8n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!FbCVDoc3r24SyHFW!7OCUDZAskQEe1lPthPrEjJPqyNukdV72ZroNmQMPVsAvCtTRypeZRlC10iKSxRO3QiThjhwg2pSGW4M$>.


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/48343491a70940e3b5cbe9287af696d0%403ds.com.

Reply via email to