[erlang-questions] How can I debug this?

Dave Cottlehuber dave@REDACTED
Wed Jul 25 14:14:34 CEST 2012


On 25 July 2012 10:25, Joe Armstrong <erlang@REDACTED> wrote:
> Better is to add it to the erlang startup file.
>
> On a unix or mac you just make a file called ".erlang" which is either
> on ${HOME}/.erlang
> or the  directory you start erlang from.
>
> I tried to do this on windows but I have no evironment variable HOME
> and I do now have write permissions
> under Program Files (or whatever)
>
> (( Actually I'd like to keep an up-to-date install guide on the erlang
> web site so if anybody
> could tell me how to make a .erlang file on windows I would be appreciate this))

On Windows, the HOME env var trick doesn't work, you need to use the
current working directory of the werl/erl process instead.
@Joe what format (or where in OTP source) is best for documenting
this? I've got a few other things that would be useful too.

## Creating a working .erlang file:

- open notepad or <decent_editor_of_your_choice>,  and paste this in,
or whatever you prefer:

   c:pwd(), io:format("running .erlang~n", []).

- file -> save as ".erlang" including the double quotes. This tells
the dialog box NOT to add .txt, just to use the provided filename.

## Create a shortcut to use this new startup file:

- right-click on desktop
- create new shortcut
- enter path c:\erlang\bin\werl.exe (or where-ever you installed the
appropriate version)
- name it whatever & click finish
- right-click on new icon & select "properties"
- change "Start In" field to the directory you want to load your
.erlang file from
- click OK

## Alternatively, from command line

    start  /d c:\home c:\erlang\bin\werl.exe

Or:

- change directory to the same folder as your .erlang file
- run c:\erlang\bin\werl.exe (or erl.exe)

BTW Ian's original issue is that Chicago Boss uses proper as a rebar
dependency, and proper uses some shell scripts which don't work under
native windows. This prevents Boss from compiling successfully
depending on what unix-like shell you are using, if any.

A+
Dave



More information about the erlang-questions mailing list