Re: [packer] Re: Debugging packer with visual studio code

2019-09-01 Thread Khai Do
toche Rickard, https://github.com/hashicorp/packer/pull/8054


On Thursday, August 29, 2019 at 3:00:39 PM UTC-7, Rickard von Essen wrote:
>
> > but would
> be nice to have this info in the documentation somewhere so I wouldn't
> have to waste my time trying to figure out why debugging doesn't work
> with packer.
>
> Yes that would be nice (but as always with open source software someone 
> has to contribute that) 
>
> On Thu, Aug 29, 2019, 16:20 Khai Do > 
> wrote:
>
>> I'm not trying to do anything specific yet I just wanted to prepare a
>> general development environment to make contributions which, for me,
>> includes a debugger.  Thanks for the clarification Rickard but would
>> be nice to have this info in the documentation somewhere so I wouldn't
>> have to waste my time trying to figure out why debugging doesn't work
>> with packer.
>>
>> On Thu, Aug 29, 2019 at 3:42 AM Rickard von Essen
>> > wrote:
>> >
>> > Each plugin is running in a separate process and the communicates with 
>> RCP over a socket. So using a debugger will not work (be complicated at 
>> least).
>> >
>> > But most of the Packer code is really simple and easy to follow with 
>> PACKER_LOG turned on. If that doesn't work adding some extra debug print 
>> outs when you have homed in on the problem is usually enough.
>> >
>> > What are trying to do?
>> >
>> > On Thu, Aug 29, 2019, 01:38 Khai Do > 
>> wrote:
>> >>
>> >> Also this is my VS code launch configuration:
>> >>
>> >>
>> >> {
>> >>  "version": "0.2.0",
>> >>  "configurations": [
>> >>  {
>> >>  "name": "Launch",
>> >>  "type": "go",
>> >>  "request": "launch",
>> >>  "mode": "auto",
>> >>  "program": "${fileDirname}",
>> >>  "env": {"PACKER_LOG": "1", "AWS_PROFILE": "itsandbox", "AWS_REGION": 
>> "us-east-1"},
>> >>  "cwd": "/work/packer/test",
>> >>  "args": ["build", "-debug", "-on-error=ask", "template.json"]
>> >>  }
>> >>  ]
>> >> }
>> >>
>> >>
>> >> --
>> >> This mailing list is governed under the HashiCorp Community Guidelines 
>> - https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>> >>
>> >> GitHub Issues: https://github.com/mitchellh/packer/issues
>> >> IRC: #packer-tool on Freenode
>> >> ---
>> >> You received this message because you are subscribed to the Google 
>> Groups "Packer" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send 
>> an email to packe...@googlegroups.com .
>> >> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/73d89fd6-1f70-4d09-be5b-5d3a86947722%40googlegroups.com
>> .
>> >
>> > --
>> > This mailing list is governed under the HashiCorp Community Guidelines 
>> - https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>> >
>> > GitHub Issues: https://github.com/mitchellh/packer/issues
>> > IRC: #packer-tool on Freenode
>> > ---
>> > You received this message because you are subscribed to a topic in the 
>> Google Groups "Packer" group.
>> > To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/packer-tool/sfmZootjHBU/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to 
>> packe...@googlegroups.com .
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/CALz9Rt8Ko%3Dmnq%2BOamYOuYAtZ8DAFpkQSvw3cr_dUVRbfabtcng%40mail.gmail.com
>> .
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packe...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/CAOAVMhZMRnq6TD65qJMPwdJ_%2B3qcpW0f2FmXVp%3DgVm%2BkWtuE_Q%40mail.gmail.com
>> .
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/1996e76d-5f63-4177-9af1-48b23f79b322%40googlegroups.com.


Re: [packer] Re: Debugging packer with visual studio code

2019-08-29 Thread Rickard von Essen
> but would
be nice to have this info in the documentation somewhere so I wouldn't
have to waste my time trying to figure out why debugging doesn't work
with packer.

Yes that would be nice (but as always with open source software someone has
to contribute that)

On Thu, Aug 29, 2019, 16:20 Khai Do  wrote:

> I'm not trying to do anything specific yet I just wanted to prepare a
> general development environment to make contributions which, for me,
> includes a debugger.  Thanks for the clarification Rickard but would
> be nice to have this info in the documentation somewhere so I wouldn't
> have to waste my time trying to figure out why debugging doesn't work
> with packer.
>
> On Thu, Aug 29, 2019 at 3:42 AM Rickard von Essen
>  wrote:
> >
> > Each plugin is running in a separate process and the communicates with
> RCP over a socket. So using a debugger will not work (be complicated at
> least).
> >
> > But most of the Packer code is really simple and easy to follow with
> PACKER_LOG turned on. If that doesn't work adding some extra debug print
> outs when you have homed in on the problem is usually enough.
> >
> > What are trying to do?
> >
> > On Thu, Aug 29, 2019, 01:38 Khai Do  wrote:
> >>
> >> Also this is my VS code launch configuration:
> >>
> >>
> >> {
> >>  "version": "0.2.0",
> >>  "configurations": [
> >>  {
> >>  "name": "Launch",
> >>  "type": "go",
> >>  "request": "launch",
> >>  "mode": "auto",
> >>  "program": "${fileDirname}",
> >>  "env": {"PACKER_LOG": "1", "AWS_PROFILE": "itsandbox", "AWS_REGION":
> "us-east-1"},
> >>  "cwd": "/work/packer/test",
> >>  "args": ["build", "-debug", "-on-error=ask", "template.json"]
> >>  }
> >>  ]
> >> }
> >>
> >>
> >> --
> >> This mailing list is governed under the HashiCorp Community Guidelines
> - https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
> >>
> >> GitHub Issues: https://github.com/mitchellh/packer/issues
> >> IRC: #packer-tool on Freenode
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups "Packer" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to packer-tool+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/73d89fd6-1f70-4d09-be5b-5d3a86947722%40googlegroups.com
> .
> >
> > --
> > This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
> >
> > GitHub Issues: https://github.com/mitchellh/packer/issues
> > IRC: #packer-tool on Freenode
> > ---
> > You received this message because you are subscribed to a topic in the
> Google Groups "Packer" group.
> > To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/sfmZootjHBU/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> packer-tool+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CALz9Rt8Ko%3Dmnq%2BOamYOuYAtZ8DAFpkQSvw3cr_dUVRbfabtcng%40mail.gmail.com
> .
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CAOAVMhZMRnq6TD65qJMPwdJ_%2B3qcpW0f2FmXVp%3DgVm%2BkWtuE_Q%40mail.gmail.com
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8wRx5WpgEKMiUPf%2BkC1SRFSAay0pEBuYMLc6UT5NQ7Dg%40mail.gmail.com.


Re: [packer] Re: Debugging packer with visual studio code

2019-08-29 Thread Khai Do
I'm not trying to do anything specific yet I just wanted to prepare a
general development environment to make contributions which, for me,
includes a debugger.  Thanks for the clarification Rickard but would
be nice to have this info in the documentation somewhere so I wouldn't
have to waste my time trying to figure out why debugging doesn't work
with packer.

On Thu, Aug 29, 2019 at 3:42 AM Rickard von Essen
 wrote:
>
> Each plugin is running in a separate process and the communicates with RCP 
> over a socket. So using a debugger will not work (be complicated at least).
>
> But most of the Packer code is really simple and easy to follow with 
> PACKER_LOG turned on. If that doesn't work adding some extra debug print outs 
> when you have homed in on the problem is usually enough.
>
> What are trying to do?
>
> On Thu, Aug 29, 2019, 01:38 Khai Do  wrote:
>>
>> Also this is my VS code launch configuration:
>>
>>
>> {
>>  "version": "0.2.0",
>>  "configurations": [
>>  {
>>  "name": "Launch",
>>  "type": "go",
>>  "request": "launch",
>>  "mode": "auto",
>>  "program": "${fileDirname}",
>>  "env": {"PACKER_LOG": "1", "AWS_PROFILE": "itsandbox", "AWS_REGION": 
>> "us-east-1"},
>>  "cwd": "/work/packer/test",
>>  "args": ["build", "-debug", "-on-error=ask", "template.json"]
>>  }
>>  ]
>> }
>>
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in violation 
>> of those guidelines may result in your removal from this mailing list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packer-tool+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/73d89fd6-1f70-4d09-be5b-5d3a86947722%40googlegroups.com.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines - 
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
> those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to a topic in the Google 
> Groups "Packer" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/packer-tool/sfmZootjHBU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/packer-tool/CALz9Rt8Ko%3Dmnq%2BOamYOuYAtZ8DAFpkQSvw3cr_dUVRbfabtcng%40mail.gmail.com.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAOAVMhZMRnq6TD65qJMPwdJ_%2B3qcpW0f2FmXVp%3DgVm%2BkWtuE_Q%40mail.gmail.com.


Re: [packer] Re: Debugging packer with visual studio code

2019-08-29 Thread Rickard von Essen
Each plugin is running in a separate process and the communicates with RCP
over a socket. So using a debugger will not work (be complicated at least).

But most of the Packer code is really simple and easy to follow with
PACKER_LOG turned on. If that doesn't work adding some extra debug print
outs when you have homed in on the problem is usually enough.

What are trying to do?

On Thu, Aug 29, 2019, 01:38 Khai Do  wrote:

> Also this is my VS code launch configuration:
>
>
> {
>  "version": "0.2.0",
>  "configurations": [
>  {
>  "name": "Launch",
>  "type": "go",
>  "request": "launch",
>  "mode": "auto",
>  "program": "${fileDirname}",
>  "env": {"PACKER_LOG": "1", "AWS_PROFILE": "itsandbox", "AWS_REGION":
> "us-east-1"},
>  "cwd": "/work/packer/test",
>  "args": ["build", "-debug", "-on-error=ask", "template.json"]
>  }
>  ]
> }
>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/73d89fd6-1f70-4d09-be5b-5d3a86947722%40googlegroups.com
> 
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8Ko%3Dmnq%2BOamYOuYAtZ8DAFpkQSvw3cr_dUVRbfabtcng%40mail.gmail.com.


[packer] Re: Debugging packer with visual studio code

2019-08-28 Thread Khai Do
Also this is my VS code launch configuration:


{
 "version": "0.2.0",
 "configurations": [
 {
 "name": "Launch",
 "type": "go",
 "request": "launch",
 "mode": "auto",
 "program": "${fileDirname}",
 "env": {"PACKER_LOG": "1", "AWS_PROFILE": "itsandbox", "AWS_REGION": 
"us-east-1"},
 "cwd": "/work/packer/test",
 "args": ["build", "-debug", "-on-error=ask", "template.json"]
 }
 ]
}


-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/73d89fd6-1f70-4d09-be5b-5d3a86947722%40googlegroups.com.