KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ IDEA platform IDEs (DataGrip, AppCode, IntelliJ IDEA, PHPStorm, PyCharm, Rubymine, WebStorm).
It works with the free, open source Community edition of IntelliJ IDEA in addition to the paid JetBrains IDEs like Ultimate edition of IntelliJ. No feature is locked to a the paid version of the IDEs, but the plugin works best in IntelliJ because only IntelliJ supports projects with different languages than the default (Java for IntelliJ, Ruby for Rubymine, etc).
The plugin itself is free. Once you have your IDE of choice installed, you can install this plugin.
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
I’ve started working on a new library to run SQL queries and do basic business intelligence.
Think “Blazer for Elixir.”
Currently it fe...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 41 to 50- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
KronicDeth
v6.7.0
Donate
Thanks
Changelog
v6.7.0
Enhancements
{EOL}|.→{ANY}inElixir.flexEOLtoWHITE_SPACEtoken, as GrammarKit is smarter about reparsing when onlyWHITE_SPACEchanges in size.fndo->after,catch,else, andrescue)(Bug Fixes
Remove
!stabOperationPrefixbeforeexpression, sincestabOperationPrefixitself starts withexpressionand instead put a negative look-ahead,!(infixComma | stabInfixOperator)afterexpression. This now works when it previously didn’t becauseCOMMAwas added toexpressionRecoverUntil, which means bothCOMMAandSTAB_OPERATORare now in both not eaten byexpression’s error recovery.This drops Fn1 through Fn8 to ~176ms instead of the previous time of the last optimization of 13 seconds for Fn8. It started at 26 seconds and now it appears that the time no longer grows with the number of
fn. It also eliminates the pause when hitting entering inside thefnnesting.Data and Chart
Installation Instructions
KronicDeth
Version 7.0.0
Donate
Thanks
mix credospiking the CPU can make IntelliJ appear sluggish while its usingmix credofor annotations.Changelog
v7.0.0
Enhancements
eolStarparser rules around operators where they do not matter leaving only theeolStarafterCOMMAand the the ones that help differentiate unary and binary+/-. This simplifies the parser and under certain conditions should prevent reparsing when onlyWHITE_SPACEchanges in size.EOLor normalWHITE_SPACE.EOL, try to match all followingWHITE_SPACE,ESCAPED_EOLandEOL.If you want to limit the performance impact of the credo annotator because
mix credospikes your CPU, you can limit the number ofmix credoruns to 1 per open file by disabling the Explanation tooltipIf you don’t want the annotator to run at all on open editors, then you can disable the paired
inspection
If you’ve unchecked the inspection, it disables both the annotation and the pair inspection when Analyze > Inspect Code… is run. You can still run the Credo inspection by name.
You’ll be presented with a “Run ‘Credo’” dialog
depsto “Custom scope”VirtualFilePointerManagerduringParsingTestCaseLineMarkerInfoon leaf elements for Method (Call Definition) Separators for a performance improvement.Bug Fixes
Releaseof Elixir is used indirectly, using aLevelenumthat only cares about the major and minor version. Changing theLevel, will mark the open files and .beam files as invalidated, so that if the SDK is changed, the stubs and codeLevelwill agree, so there isn’t a stub incompatibility with the PSI. - @KronicDethIncompatible Changes
README Updates
Credo
Annotator
If
credois not installed as a project dependency, nothing will happen, but if it is installed,mix credo PATHwill be called on any files after updates have quieted. Anycredocheck failures will show up as warning annotationsIndividual check failures will show the explanation (from
mix credo PATH:LINE(:COLUMN)) if you hover over the annotationYou can hover over the explanation and click the embedded links to jump to the line (and column) where the failure occurred.
Inspection
Batch Mode
If you’d like to run the
mix credoexternal annotator when it is disabled, you can run it using the inspection name.You’ll be presented with a “Run ‘Credo’” dialog
depsto “Custom scope”The Inspections Result Tool Pane will open and show results as each file is processed.
Click the
to expand the Credo section to show all warnings
Click an entry for the details of an individual warning with a code highlighting.
The view will show the parts of the file that aren’t annotated as collapsed with the discontinuous line number indicating the jumps.
If you click on + collapse markers, you can expand the collapsed sections to see the full context
Or you can hover over the collapsed section to see a tooltip preview of the expansion
Configuration
mix credoRunsmix credoRunsIf you want to limit the performance impact of the credo annotator because
mix credospikes your CPU, you can limit the number ofmix credoruns to 1 per open file by disabling the Explanation tooltipIf you don’t want the annotator to run at all on open editors, then you can disable the paired inspection
Once the annotator is disabled, you can still run the inspection in batch mode
Installation Instructions
KronicDeth
Version 7.1.0
Donate
Changelog
v7.1.0
Enhancements
mixwhen importing mix projects, so that themixpath does not need to be configured separately from the SDK path.mixpath no longer needs to be setup independently from the Elixir SDK.credoinspection, so the thecredoinspection works for Code > Code Cleanup. - @KronicDethShow Mix ExUnit in context menu in Elixir Facets, so that
appear in Rubymine when you right-click the
testdirectory and it is Marked as a Test Sources Root. It will appear green in Rubymine if already marked. To mark it, do the following:testdirectoryBug Fixes
JavadocOrderRootType.getInstance()so that it doesn’t cause an error in Small IDEs where its Extension Point is not defined.SdkAdditionalDataisnullbefore gettingErlangSDKas it can benullin certain scenarios in Rubymine. - @KronicDethFix
isConfigurationFromContext, so that it works on Mix ExUnit Run Configurations generated from directories. Check if theprogramParametersandworkingDirectorymatch by justgenerating another configuration from the context as this ensures the logic matches and includes support for
PsiDirectory.README Updates
From Existing Sources
Import project from external model
If you’ve already created a
mixproject, you can load it as an Elixir project into the plugin.Linux, homebrew installs on OSX, and Windows. Open an issue
with information about Elixir install locations on your operating system and package manager to have SDK detection
added for it.)
the directory above the
bindirectory containingelixir,elixirc,iex, andmix. (On Windows it is thedirectory containing
elixir.bat,elixirc.bat,iex.bat, andmix.bat.)mix deps.getwhen importing the projectmix local.hex --forceandmix deps.getwill be run.mix.exsfiles will be selected as “Mix projects to import”. To import just the main project and not its dependencies, click Unselect All.mix.exs. (It will likely be the first checkbox at the top.)SDK
Because Elixir is built on top of Erlang, Elixir command line commands don’t have OS native binaries, instead the OS native binaries from Erlang are used. In order to reliably find the Erlang OS native binaries, like
erlanderl.exe, the path to BOTH the Erlang SDK and the Elixir SDK must be configured. This allows you to install Erlang and Elixir with completely different package managers too: you can install Erlang withkerland Elixir withkiexand you don’t have to worry about IntelliJ not seeing the environment variables set bykerlwhen launching IntelliJ from an application launchers instead of a terminal.Since JetBrains’ OpenAPI only supports one SDK per Project or Module, to support Elixir and Erlang SDK at the same time, the Elixir SDK keeps track of an Internal Erlang SDK. When setting up your first Elixir SDK, you will be prompted to create an Erlang SDK (if you have the
intellij-erlangplugin installed) or and Erlang for Elixir SDK (if you don’t haveintellij-erlanginstalled and you need to use the minimal Erlang for Elixir SDK supplied by this plugin).Rich IDEs
Rich IDEs can use the Project Structure system to configure Elixir and Erlang SDKs and select the Project/Module SDK.
…
Small IDEs
Because Small IDEs like Rubymine do not have Project Structure, the Elixir SDK, Erlang SDK, and selected SDK must be configured in Preferences.
Elixir Facet SDK
Facets are a feature of JetBrains OpenAPI that allow additional languages and frameworks to be added to a Module. In Small IDEs, each Project has only one Module and its SDK MUST match the Small IDE’s language, such as a Ruby SDK in Rubymine, so to allow an Elixir SDK to be selected, an Elixir Facet is added to the Module in Small IDEs.
To configure the Elixir Facet SDK
Elixir SDKs
In Small IDEs, Elixir SDKs are tracked as Application Preferences, so any Elixir SDK you create in one project will be usable in another and you won’t have to create the SDK in each project, just select it.
Open Preferences > Languages & Frameworks > Elixir > SDKs
Click
+to add a new Elixir SDKIf you don’t already have an Erlang SDK for Elixir SDK setup, you’ll need to create one first.
You’ll be prompted with the default path for the most recent version of Erlang installed.
You can change directory to a select a different version. The home directory for “Erlang SDK for Elixir SDK” for Homebrew is NOT
/usr/local/Cellar/erlang/VERSION, but/usr/local/Cellar/erlang/VERSION/lib/erlangdue to where the OTP appebindirectories are located.Click OK to create the Erlang SDK for Elixir SDK.
With at least one Erlang SDK for Elixir SDK setup, you’ll be prompted with the default path for the most recent version of Elixir installed.
Click OK to create the Elixir SDK.
Click Apply to save the Preferences changes or OK to save and close.
You can further customize the Elixir SDK by selecting its name from the left list.
ebindirectories on the Classpath tabInternal Erlang SDK
If you want to change the Internal Erlang SDK, you’ll need to create a new Erlang SDK for Elixir SDK.
Open Preferences > Languages & Frameworks > Elixir > Internal SDKs
Follow the same steps as above to create an SDK
Installation Instructions
KronicDeth
Version 7.2.0
Donate
Thanks
OrderRootType.getOrderRootTypenow has a@NotNullannotation, which causes newer Small IDE releases to break when trying to accessJavaDocRootType.getInstance().Changelog
v7.2.0
Enhancements
mixruns will be faster as they will no longer check to see if the SDK is updated. - @KronicDethBug Fixes
@NotNulltoOrderRootType.getOrderRootType, whichJavaDocRootType.getInstancecalls, which means any Small IDE usingintellij-communitysince 4 months ago, including the newest CLion cannot haveJavadocOrderRootType.getInstancesafely called. - @KronicDethprojectSdksModel.apply()was being called before theeditor.apply(), which would have copied to theeditor's path changes to theprojectSdksModel. - @KronicDethInstallation Instructions
KronicDeth
Version 7.2.1
Donate
Thanks
.batwas no longer needed on WIndowsExternalLanguageAnnotators.allForFilewas being called with anullPsiFileCLASSESandSOURCESRoot Types are installedChangelog
v7.2.1
Bug Fixes
documentionRootTypeto indirectly get the documentationOrderRootTypein the Erlang SDK Type, so that it works in Small IDEs that have more thanCLASSESandSOURCESroot types installed. - @KronicDethThe
credoannotator is disabled by default as numerous users find runningmix credoin the background has a negative impact on their system performance. If you like to try enabling the annotation, you can turn it on using the configuration.If you notice a degradation the in the responsiveness of the editor, it is recommended you disable the annotator again.
PsiFilebeingnullinLocalcredo inspector - @KronicDethQualified#moduleNamegetTextin Read Action. - @KronicDethProject, but not aModule, so change flow to useProjectwhenModuleisnullin credo annotator. - @KronicDeth.battomixon Windows.mixis never run as an executable. It is either run as a script toelixir.batOR as an argument toerl.exewhenerl.exeis runningelixir. - @KronicDethREADME Updates
Credo
Annotator
When enabled, if
credois not installed as a project dependency, nothing will happen, but if it is installed,mix credo PATHwill be called on any files after updates have quieted. Anycredocheck failures will show up as warning annotationsIndividual check failures will show the explanation (from
mix credo PATH:LINE(:COLUMN)) if you hover over the annotationYou can hover over the explanation and click the embedded links to jump to the line (and column) where the failure occurred.
Enable
The
credoannotator is disabled by default as numerous users find runningmix credoin the background has a negative impact on their system performance. If you like to try enabling the annotation, you can turn it on using the configuration.Disable
If you notice a degradation the in the responsiveness of the editor, it is recommended you disable the annotator again.
Installation Instructions
KronicDeth
Version 7.3.0
Donate
Thanks
StreamExis missingnonNullon some IDEs/versionsChangelog
v7.3.0
Enhancements
.beamfiles: “BEAM Chunks”. The decompiled binary file will continue to be shown on the default “Text” editor tab.Support for Remove incorrect wording regarding test cases · elixir-lang/elixir@23c7542 · GitHub
%ExUnit.Test{}field%ExUnit.TestCase{}:case_started:case_finishedcase%ExUnit.TestCase{}:module_started:module_finishedmoduleBecause Elixir 1.6.0 could not introduce a breaking change, the
< 1.6.0events are fired, butresources/exunit/1.6.0/team_city_ex_unit_formatting.exwill ignore them and only convert the>= 1.6.0events to TeamCity event used in the JetBrains Test Runner UI.Bug Fixes
StreamExbecause support is inconsistent across IDEs - @KronicDethREADME.mdUpdates.beamFiles.beamfiles are the compiled version of modules on the BEAM virtual machine used by Elixir and Erlang. They are the equivalent of.classfiles in Java..beamfiles are not detected purely by their file extension: the BEAM file format starts with a magic number,FOR1, that is checked for before decompiling..beamfiles have 2 editors registered: decompiled Text and BEAM ChunksDecompression
If the
.beammodule was compiled with thecompressedcompiler directive, which in Erlang looks likeand in Elixir looks like
then the outer file format is GZip (which is detected by checking for the gzip magic number,
1f 8b, at the start of the file) and the.beamwill be (stream) decompressed before the.beamheader is checked and the chunks decoded.BEAM Chunks
.beamfiles are composed of binary chunks. Each chunk is formattedThis format is generically referred to as Type-Length-Value
The BEAM Chunks editor tab is subdivided into further tabs, one for each chunk in the
.beamfile.The tabs are listed in the order that the chunks occur in the .beam file.
Atom/AtU8The
Atomchunk holds LATIN-1 encoded atoms whileAtU8chunk holds UTF-8 atoms. There will only be one of these atom-related chunks in any given.beamfile.AtU8is used in newer versions of OTP that support UTF-8 atoms.AtU8was introduced in OTP 20.Format
Tab
The
Atom/AtU8tab shows a table with the columnsCodechunk,atom(0)is reserved to always translate tonilAtomchunk or UTF-8 forAtU8chunkAttrThe
Attrchunk holds the module attributes, but only those that are persisted. Erlang module attributes are persisted by default, but in Elixir module attributes need to be marked as persisted withModule.register_attribute/3Format
The
Attrchunk uses External Term Format (term_to_binary’s output) to encode a proplist, which is similar to, but not quite the same an Elixir Keyword listAll modules will have a
:vsnattribute that is either set explicitly or defaults to the MD5 of the module.Tab
The
Attrtab shows a table with the columnsCInfThe
CInfchunk is the Compilation Information for the Erlang or Erlang Core compiler. Even Elixir modules have it because Elixir code passes through this part of the Erlang Core compilerFormat
The
CInfchunk uses External Term Format (term_to_binary’s output) to encode a proplist, which is similar to, but not quite the same an Elixir Keyword listTab
The
CInftab shows a table with the columnsCodeThe
Codechunk contains the byte code for the module.Format
It is encoded in BEAM Compact Term Encoding, which differs from the binary format produced by
term_to_binary.Tab
The
Codetab shows a read-only editor with one byte code operation on each line. For ease of reading, operations are grouped by function and then label block with indentation indicating scope.By default as many references to other chunks and references to other parts of
Codechunk are inlined to ease understanding. If you want to see the raw byte code operations, you can turn off the various inliners.####### Controls
atom(0)is inlined asnilatom(N)if "Inline Integers" is Offatom(n)looks up index `n` in `Atom`/`AtU8` chunk and inlines its `inspect`ed versionNif "Inline Integers" is On and the argument supports "Inline Integers"literal(n)looks up indexninFunTchunk and inlines the name if the argument supports "Inline Functions"literal(n)if "Inline Integers" is Offnif "Inline Integers" is On and the argument supports "Inline Integers"literal(n)looks up indexninImpTand inlines it as a function reference:&module.name/arityif argument supports "Inline Functions"literal(n)if "Inline Integers" Is Offnif "Inline Integers" is On and the argument supports "Inline Integers"atom(n)andliteral(n)inline asnif argument supports "Inline Integers"atom(n),integer(n), andliteral(n)integer(n)inlines asnlabel(n)inlines asnif argument supports "Inline Labels"label(n)line(literal(n))looks up index `n` in the "Line Reference" table in the `Lines` chunk. The Line Reference contains a file name index and line. The file name index is looked up in the "File Name" table in the `Lines` chunk. The line from the Line Reference and the File name from the "File Name" table are inlined as `line(file_name: file_name, line: line)`.lineoperations are left as isliteral(n)looks up indexninLitTchunk and inlines its `inspect`ed version if the argument supports "Inline Literals"literal(n)label(n)findslabel(n)inCodechunk, then searches back for the previousfunc_infooperation, then inlines it as a function reference:&module.name/arityif argument supports "Inline Local Calls"label(n)bit_lengthandbyte_offsetinto `StrT` chunk as their CharList value if supported by operation as value tostringargument namebit_lengthandbyte_offsetarguments are left as isIf any of the inliners are incorrect or you have an argument name that makes more sense, please open an issue.
DbgiThe
Dbgichunk contains Debug Info. It was introduced in OTP 20 as a replacement for theAbstchunk. While theAbstchunk was required to contain the Erlang AST, theDbgiformat can contain the debug info for other languages, such as Elixirquotedform AST.Format
Because the format is language neutral, the format is a set of nested, versioned formats. The outer most layer is
For
:debug_info_v1, Elixir’sbackendis:elixir_erl. Themetadatafor:elixir_erlis further versioned:{:elixir_v1, map, specs}.mapcontains the bulk of the data.:attributesAttrchunk, but at the Elixir, instead of Core Erlang level. Usually they match with the exception thatattributesdoesn’t containvsnwhenAttrcontains theMD5version:compile_optsCInfchunk’soptionskey, but at for Elixir, instead of Core Erlang level.:definitionsquotedAST for reach function clause.:file:line:filewhere the module was defined, such as the linedefmoduleoccurred.:moduleatom:unreachableTab
The
Dbgitag show the single value map entries::file,:line, and:module.For the multi-value keys:
:attributes,:compile_opts, and:definitions, there are individual tabs.####### Attributes
The Attributes tab has the same format as the
Attrs chunk.####### Compile Options
The Compile Options tab is usually empty, much like the
CInfoptionskey for Erlang.####### Definitions
The Definitions tab is split between a tree of Module, Function/Arity and clauses.
Clicking on a clause will show only that clause, but clicking on a higher level in the tree will show all clauses in the function or the entire Module.
The AST stored in the
definitionstab and the process of converting it back to code is not format preserves, so it will not look precisely like the source code as the AST has undergone some macro expansion before its put in theDbgichunk. As common idioms are understood, reversals will be add to the renderer.ExDcThe
ExDcchunk stores ExDoc. Not the rendered HTML from theex_docpackage, but the the@doc,@moduledoc, and@typedocattribute values that work even withoutex_docinstalled. This chunk is what is consulted when thehhelper is used iniex.Format
The
ExDcchunk is the encoded withterm_to_binary. The term format is a versioned as{version, versioned_format}. The currentversiontag is:elixir_docs_v1and theversioned_formatis a Keyword.t with keys matching theCode.get_docs/2tags:callback_docs,:docs,:moduledoc, and:type_docskeys.Tab
Like
Dbgi, theExDctab is split between a tree to navigate and an editor to show the decompiled value.Click on a node in the tree will show all docs at that level and any descendants.
@moduledoc@typedocs@typedoc@callback@docs@callback’s@doc@docs for functions/macros@docExpTThe
ExpTchunk is the Export Table. The name “Export” derives from theErlangmodule attribute-export, which is used to “export” functions from a module. It is the equivalent of making a function or macro public withdefanddefmacroas opposed to making it private withdefpanddefmacropin Elixir.Format
The BEAM format and the
ExpTchunk, being made for Erlang, has no concept of macros. It only understands functions, so Elixir macros, like__using__/1called byuseare compiled to plain Erlang functions withMACRO-prefixed to their name and an extra argument (the__CALLER__environment) as the first argument, which increases the arity, yielding a full MFA ofMACRO-__using__/2as seen above.Tab
The
ExpTtab shows a table with the columnsAtomorAtU8chunk for the function’s nameCodechunk where the function is defined. This label is usually immediately after thefunc_infooperation and before the first pattern match or guard operation.ImpTThe
ImpTchunk is the Import Table. It DOES NOT encode just the Erlang-importattributes or Elixirimportmacro calls: it tracks any external function or macro called from another module.call_ext_*operations in theCodechunk don’t store the Module and Function (MF) of the function they will call directly in the bytecode, instead, one of the arguments is an index into theImpTchunk. This way, all external calls are normalized into theImpTchunk instead of being denormalized to the call site. The arity still appears at the call site to help with checking the argument count.Format
You may notice that
erlang.byte_size/1is included in the table. This is because even BIFs are referenced by MFA and not a pre-assigned number as would be the case for system calls in operating systems like Linux. BEAM is like an Operation System, but not in all ways.Tab
The
ImpTtab shows a table with the columnsCodechunk.AtomorAtU8chunk for the Module’s nameAtomorAtU8chunk for the functon’s nameLitTThe
LitTchunk contains literals loaded as arguments inCodechunk.Format
Confusingly, in the
Codechunk sometimes theliteral(N)term is used to encode integerN, an index into another chunk, or an actualindexinto theLitT. Howliteralterms are handled is completely dependent on the specific operation, so without having outside knowledge about the bytecode operation arguments for BEAM, the best way to figure out ifliteralterms are an integer or an index is to toggle the various controls in theCodetab to see ifliteralwith no inlining turns into aLitTliteral,FunTfunction reference,ImpTfunction reference, or integer.Tab
The
LitTtab shows a table with the columnsCodechunk.LineThe
Linechunk encodes both the file name and line number for eachline(literal(n))operation in theCodechunk. Theninline(literal(n))is an index in to the Line References table in theLinechunk. This is used in Phoenix view modules to show where code from templates comes from.Format
The
Linechunk is composed of 2 subsections: (1) Line References and (2) File Names. First there is a header setting up the number of each entry to expect.####### Line References
This uses the Compact Term Format used for the
Codechunk. The format ends up producing{file_name_index, line}pairs using the following algorithm:atom(n)file_name_indextoninteger(n){file_name_index, n}to end of Line References####### File Names
Tab
The
Linetab has one subtab for each subsection in the tab. Each subsection has its own table.LocTThe
LocTchunk is the dual to theExpTchunk: it contains all private functions and macros.Format
You’ll notice entries like
-__struct__/1-fun-0-, starts with-and have a/suffix withfunin it. This naming scheme is used for anonymous functions such as those defined withfnor the capture operator (&) in Elixir. Much like how macros don’t really exist and use aMACRO-suffix, anonymous functions/lambdas don’t exist, and instead use a distinct naming scheme-<PARENT_FUNCTION>/*fun*. UnlikeMACRO-, which is an Elixir invention, anonymous functions/lambdas really being local named functions with derived names is also done in pure Erlang modules. Erlang’s anonymous functions are defined withfun, which is where thefunpart of the naming scheme comes from.Tab
The
LocTtab shows a table with the columnsAtomorAtU8chunk for the function’s nameCodechunk where the function is defined. This label is usually immediately after thefunc_infooperation and before the first pattern match or guard operation.StrTThe
StrTchunk contains all Erlang strings (that is, Elixir charlists) used in theCodechunk.Format
The
StrTchunk contains a single contiguous pool. These strings are used for byte code operations likebs_put_string. Not all strings appear inStrT. Some strings, including most Elixir strings (Erlang binaries) appear in theLitTchunk that holds literals. I’m not sure how the compiler determines whether to useStrTorLitT. I think it all depends on the byte code operation.Instead of encoding the start and length of each string in the chunk itself, the start and length for any given string is passed as arguments to the byte code operations in the
Codechunk. By doing this, shared substrings can be efficiently encoded inStrT.Tab
Installation Instructions
OvermindDL1
Wow, that’s an amazing post and a fantastic update!!
I really need to see if I can get intellij running well so as to use it, the java-built IDE is just sooooo laggy at times (nothing to do with the plugin at all, it just does that anywhere/everywhere).
KronicDeth
The default install of IntelliJ launches the JVM with a max of 750 MB. (Slack and Chrome normally use gigs of memory, so this isn’t a lot really for an IDE) It won’t ask you to increase this memory limit until its been stuck garbage collecting for tens of minutes, so usually, it ends up appearing laggy where it’s stuck GCing a lot when close to the limit.
You can turn on a memory usage display in the bottom right status bar:
The docs for IntelliJ explain the status bar in more detail.
You can increase the max allowed memory for the JVM with
-Xmxargument to change the max memory.mmeans megabytes,gmeans gigabytes, so a max memory of 1 gigabyte would be-Xmx1g.The status bar indicator should show the new max memory in the “C of DM” for C of D megabytes used.
OvermindDL1
I changed the default allocated memory long ago to 2Gigs just because of those issues in the past. ^.^
A lot of the lag just seems to be in the GUI itself though, like it can take a second to change tabs for one example of many, it’s just lots and lots and lots of little things that combine to make the overall experience feel ‘slow’. Eclipse has the same problems. And it’s the same experience on Windows 10 and multiple linux machines thus far.
KronicDeth
Version 7.4.0
Donate
Thanks
bcryptkilled the debuggerlz4andre2killed the debuggerasdfSDK incompatibilities and correct configurationChangelog
v7.4.0
Enhancements
mix formatdebuggerINTELLIJ_ELIXIR_DEBUG_BLACKLISTenvironment variable.INTELLIJ_ELIXIR_DEBUG_BLACKLISTshould be reserved to additional modules that need to not be interpreted only for specific runs.mix phx.newdependencies, so that debugger boots faster for most users..eextemplates.eextemplate files, to allow stepping through Elixir tags in those templates..eexfiles when a.beamfile using the template’s relative can be found. This means that the Phoenix view module.beamfile must exist in_buildprior to setting a breakpoint. Run the Run Configuration once, before debugging to complete the build if setting a breakpoint does not work..beamfiles are now indexed by theirLinechunkfilenamessubsection to power this feature..beamBeamCacheonVirtualFile. Cache is invalidated and refreshed on modification of theVirtualFile. Cache is used for both BEAM Chunks read-only editors andLinechunk file name index.ProcessAdapterturns warning text into errors that IDE understands.Bcrypt.Base:erocksdb:lz4:re2Bug Fixes
dbeugflag when startingIntelliJElixir.DebugServer, which removes the*DBG*statements that kept printing in the ExUnit output when using the debugger.INTELLIJ_ELIXIR_DEBUG_BLACKLISTenvironment variable.nullSDKRelease, so that when Elixir is configured, but the Erlang path is broken (such as after abrew unlink erlang, theReleasecalculating usingelixirMacro.atomToString|for presenationheadandtailinstead of index.0-based) instead of Erlang indices (1-based`) for lists and tuples.liband notlib/erlang/lib, so that it works for both Homebrew’sebinpaths and ASDF’sebinpaths. - @KronicDethMixBuilderbecause building withmixis just an option inElixirBuilder.mixto pattern used in Run Configuration runners.mixpath from SDKmixerrorsmix compileoutput for compilation errors and warningserlang_module_name_patterns_to_regexbefore pinning: I always forget that the|swallows the^and$in regexes.Enum.reduceto track rejections.:to start of Erlang module names for included debugger excludesREADME updates
Debugger
Basics
Excluding Modules
By default, the debugger will scan all the load paths and build path for
.beamfiles and the corresponding modules will be interpreted which causes the Module’s Erlang abstract code chunk to be interpreted in Erlang instead of the bytecode chunk being executed in the C parts of the BEAM. This interpretation is much slower than execution, so by default all of the Elixir standard library and the common modules installed in Phoenix projects are excluded from being interpreted when the debugger starts. The modules can be still be stepped into or have breakpoints explicitly set.You can customize these module patterns as an application setting.
Disabling Existing Module Patterns
Editing Existing Module Patterns
Removing Existing Module Patterns
Adding New Module Patterns
Environment Variables
If you want to customize the modules to ignore on a per-Run-Configuration basis, you can set an environment variable in the Run Configuration.
Notice: If you want non
Elixir.module in blacklist, write it with::. This rule applies only to module atoms.Breakpoints
Creating Line Breakpoints
A line breakpoint is a breakpoint assigned to a specific line in the source code.
Line breakpoints can be set on executable lines. Comments, declarations and empty lines are not valid locations for the line breakpoints. Line break points can be set in
.exand.eexfiles..eexline breaks will only work on Elixir code that is used in Phoenix view modules..eexbreakpoints only work if a.beamfile using the template’s relative can be found. This means that the Phoenix view module.beamfile must exist in_buildprior to setting a breakpoint. Run the Run Configuration once, before debugging to complete the build if setting a breakpoint does not work.Cmd+F8Building/Compiling
Settings
mix compileinstead ofelixircdirectly)--no-docselixircflag)--no-debug-infoelixircflag)--warnings-as-errorselixircflag)--ignore-module-conflictelixircflag)Build Messages
If a file has errors and warnings, they are group together in Build Messages under that file.
Jump To Source
You can jump to errors and warnings in the Build Messages
Highlight the error or warning you want to jump to source
Do one of the following
Right-Click the error or warning
Select Jump to Source from the context menu
OR
You can also turn on Autoscroll to Source, which will Jump To Source whenever you Click or select an error or warning.
Warnings as Errors
If you enable Warnings as Errors in the settings, then the Warnings will be treated as Errors by
elixircandmixand the Build Messages will show the Warnings as Errors.If only warnings remain in the source.
With Warnings as Errors On, all the Warnings will appear as Errors and still fail the build
With Warnings as Errors Off, the Warnings will appear as Warnings and the build will succeed
SDK
Package Manager Install Locations
When configuring an SDK, if you don’t want to use the suggested SDK home path, you’ll need to know where each package manager puts Elixir and Erlang.
~/.asdf/installs/elixir/VERSION~/.asdf/installs/erlang/VERSION/usr/local/Cellar/elixir/VERSION/usr/local/Cellar/erlang/VERSION/lib/erlang/nix/store/SHA256-elixir-VERSION/lib/elixir/nix/store/SHA256-erlang-VERSION/lib/erlangIf you can can’t see hidden files, such as
.asdfin your home directory (~), or system directories, such as/usr, you will need to enable Show Hidden Files in the Home Path dialog.If your dialog looks like this, click the Show Hidden Files button
If you’re using the macOS native File Picker, use the keyboard shortcut ⌘⇧. (Command+Shift+Period).
Installation Instructions